예제 #1
0
 def setup_fh_manager(self):
     FileHandleManager.reset()
     self.file1 = NamedTemporaryFile('r')
     self.file2 = NamedTemporaryFile('r')
     FileHandleManager.set_max_idle_time(2)
     self.manager = FileHandleManager.get_instance()
예제 #2
0
 def setup_fh_wrapper(self):
     self.file = NamedTemporaryFile('r')
     self.manager = FileHandleManager.get_instance()
     self.fh_wrapper = self.manager.open(self.file.name)
예제 #3
0
 def test_get_instance(self):
     assert_equal(self.manager, FileHandleManager.get_instance())
     # Repeat for good measure
     assert_equal(self.manager, FileHandleManager.get_instance())
예제 #4
0
 def test_get_instance(self):
     assert_equal(self.manager, FileHandleManager.get_instance())
     # Repeat for good measure
     assert_equal(self.manager, FileHandleManager.get_instance())
예제 #5
0
 def setup_fh_manager(self):
     FileHandleManager.reset()
     self.file1 = NamedTemporaryFile('r')
     self.file2 = NamedTemporaryFile('r')
     FileHandleManager.set_max_idle_time(2)
     self.manager = FileHandleManager.get_instance()
예제 #6
0
 def setup_fh_wrapper(self):
     self.file = NamedTemporaryFile('r')
     self.manager = FileHandleManager.get_instance()
     self.fh_wrapper = self.manager.open(self.file.name)