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:
233
233
# Test using global seeding, ensuring results are the same
234
234
random .seed (0 )
235
235
randobj0_global = self .get_randobj ()
236
+ # Take a copy for later
237
+ randobj0_global_copy = deepcopy (randobj0_global )
236
238
self .randomize_and_check_result (
237
239
randobj0_global ,
238
240
results ,
@@ -259,3 +261,18 @@ def test_randobj(self) -> None:
259
261
add_results ,
260
262
add_tmp_constraints = False ,
261
263
)
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