def test_age(self): """Test view config age.""" import time file_name = path.join(path.dirname(__file__), 'test_files', 'test.cpp') self.set_up_view(file_name) manager = SettingsManager() settings = manager.settings_for_view(self.view) view_config = ViewConfig(self.view, settings) self.assertTrue(view_config.get_age() < 3) time.sleep(3) self.assertTrue(view_config.get_age() > 3) view_config.touch() self.assertTrue(view_config.get_age() < 3) time.sleep(4) self.assertTrue(view_config.is_older_than(3))
def test_age(self): """Test view config age.""" import time file_name = path.join(path.dirname(__file__), 'test_files', 'test.cpp') self.set_up_view(file_name) manager = SettingsManager() settings = manager.settings_for_view(self.view) view_config = ViewConfig(self.view, settings) self.assertTrue(view_config.get_age() < 3) time.sleep(3) self.assertTrue(view_config.get_age() > 3) view_config.touch() self.assertTrue(view_config.get_age() < 3) time.sleep(4) self.assertTrue(view_config.is_older_than(3))