While testing absolute and relative imports, remember that absolute imports
are the default now. (Should __future__ be cleaned up, and all tests for future statements be removed or changed to expect exceptions when they are used?)
This commit is contained in:
parent
477c8d5e70
commit
60254fe844
|
@ -194,12 +194,6 @@ class ImportHooksTestCase(ImportHooksBaseTestCase):
|
|||
reload(reloadmodule)
|
||||
self.failUnless(hasattr(reloadmodule,'reloaded'))
|
||||
|
||||
import hooktestpackage.oldabs
|
||||
self.assertEqual(hooktestpackage.oldabs.get_name(),
|
||||
"hooktestpackage.oldabs")
|
||||
self.assertEqual(hooktestpackage.oldabs.sub,
|
||||
hooktestpackage.sub)
|
||||
|
||||
import hooktestpackage.newrel
|
||||
self.assertEqual(hooktestpackage.newrel.get_name(),
|
||||
"hooktestpackage.newrel")
|
||||
|
@ -221,6 +215,11 @@ class ImportHooksTestCase(ImportHooksBaseTestCase):
|
|||
import sub
|
||||
self.assertEqual(sub.get_name(), "sub")
|
||||
|
||||
import hooktestpackage.oldabs
|
||||
self.assertEqual(hooktestpackage.oldabs.get_name(),
|
||||
"hooktestpackage.oldabs")
|
||||
self.assertEqual(hooktestpackage.oldabs.sub, sub)
|
||||
|
||||
import hooktestpackage.newabs
|
||||
self.assertEqual(hooktestpackage.newabs.get_name(),
|
||||
"hooktestpackage.newabs")
|
||||
|
|
Loading…
Reference in New Issue