Message114048
Btw, the comment and failure message in r81380/r81381 look wrong.
- # If absolute import syntax is used, then do not try to perform
- # a relative import in the face of failure.
+ # If explicit relative import syntax is used, then do not try
+ # to perform an absolute import in the face of failure.
self.fail("explicit relative import triggered "
- "an implicit relative import")
+ "an implicit absolute import")
In addition the TestCase.assertRaises method could be used:
def test_absolute_import_without_future(self):
# If explicit relative import syntax is used, then do not try
# to perform a relative import in the face of failure.
# Issue #7902.
with self.assertRaises(ImportError):
from .os import sep
self.fail("explicit relative import triggered an "
"implicit absolute import") |
|
Date |
User |
Action |
Args |
2010-08-16 15:17:58 | flox | set | recipients:
+ flox, loewis, brett.cannon, gangesmaster, meador.inge, Oren_Held |
2010-08-16 15:17:57 | flox | set | messageid: <1281971877.98.0.587739700369.issue7902@psf.upfronthosting.co.za> |
2010-08-16 15:17:55 | flox | link | issue7902 messages |
2010-08-16 15:17:55 | flox | create | |
|