File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,8 @@ def test_randobj(self) -> None:
233233 # Test using global seeding, ensuring results are the same
234234 random .seed (0 )
235235 randobj0_global = self .get_randobj ()
236+ # Take a copy for later
237+ randobj0_global_copy = deepcopy (randobj0_global )
236238 self .randomize_and_check_result (
237239 randobj0_global ,
238240 results ,
@@ -259,3 +261,18 @@ def test_randobj(self) -> None:
259261 add_results ,
260262 add_tmp_constraints = False ,
261263 )
264+
265+ # Test the copied globally-seeded object
266+ # Must re-seed the global random package to ensure repeatability
267+ random .seed (0 )
268+ self .randomize_and_check_result (
269+ randobj0_global_copy ,
270+ results ,
271+ do_tmp_checks ,
272+ tmp_constraints ,
273+ tmp_values ,
274+ tmp_results ,
275+ post_tmp_results ,
276+ add_results ,
277+ add_tmp_constraints = False ,
278+ )
You can’t perform that action at this time.
0 commit comments