File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -559,16 +559,16 @@ def setup_test_environment(self, **kwargs):
559559 maybe_create_svn_symlinks (settings )
560560
561561 if os .path .exists (settings .UTILS_TEST_RANDOM_STATE_FILE ):
562- print " Loading factory-boy random state from .random-state"
563- with open (settings .UTILS_TEST_RANDOM_STATE_FILE ) as f :
564- s = json .load (f )
565- s [1 ] = tuple (s [1 ]) # random.setstate() won't accept a list in lieus of a tuple
566- factory .random .set_random_state (s )
562+ print " Loading factory-boy random state from %s" % settings .UTILS_TEST_RANDOM_STATE_FILE
567563 else :
568- print " Saving factory-boy random state to .random-state"
564+ print " Saving factory-boy random state to %s" % settings . UTILS_TEST_RANDOM_STATE_FILE
569565 with open (settings .UTILS_TEST_RANDOM_STATE_FILE , 'w' ) as f :
570566 s = factory .random .get_random_state ()
571567 json .dump (s , f )
568+ with open (settings .UTILS_TEST_RANDOM_STATE_FILE ) as f :
569+ s = json .load (f )
570+ s [1 ] = tuple (s [1 ]) # random.setstate() won't accept a list in lieu of a tuple
571+ factory .random .set_random_state (s )
572572
573573 super (IetfTestRunner , self ).setup_test_environment (** kwargs )
574574
You can’t perform that action at this time.
0 commit comments