예제 #1
0
 def test_get_mod_times(self):
     from plone.reload.code import get_mod_times
     our_package = os.path.abspath(
         os.path.join(TESTS, os.pardir, '__init__.pyc'))
     times = get_mod_times()
     self.assertTrue(our_package in times)
     self.assertTrue(isinstance(times[our_package][1], types.ModuleType))
예제 #2
0
파일: test_code.py 프로젝트: Vinsurya/Plone
 def test_get_mod_times(self):
     from plone.reload.code import get_mod_times
     our_package = os.path.abspath(
         os.path.join(TESTS, os.pardir, '__init__.pyc'))
     times = get_mod_times()
     self.assertTrue(our_package in times)
     self.assertTrue(type(times[our_package][1]) == types.ModuleType)
예제 #3
0
 def test_reload_code_change(self):
     from plone.reload.code import reload_code
     from plone.reload.code import get_mod_times
     our_package = os.path.abspath(
         os.path.join(TESTS, os.pardir, '__init__.py'))
     times = get_mod_times()
     our_entry = times[our_package]
     try:
         times[our_package] = (our_entry[0] - 10, our_entry[1])
         self.assertEqual(len(reload_code()), 1)
     finally:
         times[our_package] = our_entry