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()
def setup_fh_wrapper(self): self.file = NamedTemporaryFile('r') self.manager = FileHandleManager.get_instance() self.fh_wrapper = self.manager.open(self.file.name)
def test_get_instance(self): assert_equal(self.manager, FileHandleManager.get_instance()) # Repeat for good measure assert_equal(self.manager, FileHandleManager.get_instance())