Fix those parts in the testsuite that assumed that sys.maxint would cause overflow on x64. Now the testsuite is well behaved on that platform.

This commit is contained in:
Kristján Valur Jónsson 2007-05-03 20:09:56 +00:00
parent 19ac472ba1
commit 170eee9d6a
5 changed files with 21 additions and 12 deletions

View file

@ -540,7 +540,8 @@ class Test_TestLoader(TestCase):
# audioop should now be loaded, thanks to loadTestsFromName()
self.failUnless(module_name in sys.modules)
finally:
del sys.modules[module_name]
if module_name in sys.modules:
del sys.modules[module_name]
################################################################
### Tests for TestLoader.loadTestsFromName()
@ -936,7 +937,8 @@ class Test_TestLoader(TestCase):
# audioop should now be loaded, thanks to loadTestsFromName()
self.failUnless(module_name in sys.modules)
finally:
del sys.modules[module_name]
if module_name in sys.modules:
del sys.modules[module_name]
################################################################
### /Tests for TestLoader.loadTestsFromNames()