Changeset 391 for python/trunk/Lib/test/test_modulefinder.py
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Lib/test/test_modulefinder.py
r2 r391 212 212 def create_package(source): 213 213 ofi = None 214 for line in source.splitlines(): 215 if line.startswith(" ") or line.startswith("\t"): 216 ofi.write(line.strip() + "\n") 217 else: 218 ofi = open_file(os.path.join(TEST_DIR, line.strip())) 214 try: 215 for line in source.splitlines(): 216 if line.startswith(" ") or line.startswith("\t"): 217 ofi.write(line.strip() + "\n") 218 else: 219 if ofi: 220 ofi.close() 221 ofi = open_file(os.path.join(TEST_DIR, line.strip())) 222 finally: 223 if ofi: 224 ofi.close() 219 225 220 226 class ModuleFinderTest(unittest.TestCase): … … 241 247 less = list(modules - found) 242 248 # check if we found what we expected, not more, not less 243 self. failUnlessEqual((more, less), ([], []))249 self.assertEqual((more, less), ([], [])) 244 250 245 251 # check for missing and maybe missing modules 246 252 bad, maybe = mf.any_missing_maybe() 247 self. failUnlessEqual(bad, missing)248 self. failUnlessEqual(maybe, maybe_missing)253 self.assertEqual(bad, missing) 254 self.assertEqual(maybe, maybe_missing) 249 255 finally: 250 256 distutils.dir_util.remove_tree(TEST_DIR)
Note:
See TracChangeset
for help on using the changeset viewer.