@@ -565,51 +565,6 @@ def testSaveToNonexistingPath(self):
565565 ):
566566 save .save (sess , save_path )
567567
568- def testSaveToCurrentDirectory (self ):
569-
570- temp_dir = self .get_temp_dir ()
571-
572- # Store original current dir for later recovery, set current dir to temp_dir
573- old_current_dir = os .getcwd ()
574- os .chdir (temp_dir )
575-
576- try :
577-
578- # Save to current directory, no ./ prepended to path name
579- save_path = "variables"
580-
581- with session .Session ("" , graph = ops_lib .Graph ()) as sess :
582-
583- one = variables .Variable (1.0 )
584- twos = variables .Variable ([2.0 , 2.0 , 2.0 ])
585-
586- init = variables .global_variables_initializer ()
587- save = saver_module .Saver ()
588-
589- init .run ()
590- save .save (sess , save_path )
591-
592- with session .Session ("" , graph = ops_lib .Graph ()) as sess :
593-
594- one = variables .Variable (0.0 )
595- twos = variables .Variable ([0.0 , 0.0 , 0.0 ])
596-
597- # Saver with no arg, defaults to 'all variables'.
598- save = saver_module .Saver ()
599- save .restore (sess , save_path )
600-
601- self .assertAllClose (1.0 , one .eval ())
602- self .assertAllClose ([2.0 , 2.0 , 2.0 ], twos .eval ())
603-
604- # Go back to original current dir
605- os .chdir (old_current_dir )
606-
607- except Exception as exception :
608-
609- # Go back to original current dir and then bubble up the exception
610- os .chdir (old_current_dir )
611- raise exception
612-
613568
614569class SaveRestoreShardedTest (test .TestCase ):
615570
0 commit comments