From d83c8eac8d69734c98becb28c7fa56691a8b84ad Mon Sep 17 00:00:00 2001 From: JasonGrace2282 Date: Wed, 14 Aug 2024 12:46:40 -0400 Subject: [PATCH] Improve test to make sure random is correctly set --- tests/module/scene/test_scene.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/module/scene/test_scene.py b/tests/module/scene/test_scene.py index cf08514b20..8a794c1351 100644 --- a/tests/module/scene/test_scene.py +++ b/tests/module/scene/test_scene.py @@ -1,7 +1,9 @@ from __future__ import annotations import datetime +import random +import numpy as np import pytest from manim import Circle, FadeIn, Group, Mobject, Scene, Square @@ -113,7 +115,13 @@ def __init__(self): good = GoodScene() assert good.random_seed == 3 + random_random = random.random() + np_random = np.random.random() with pytest.warns(FutureWarning): bad = BadScene() assert bad.random_seed == 3 + + # check that they both actually set the seed + assert random.random() == random_random + assert np.random.random() == np_random