Message114048
| Author |
flox |
| Recipients |
Oren_Held, brett.cannon, flox, gangesmaster, loewis, meador.inge |
| Date |
2010年08月16日.15:17:55 |
| SpamBayes Score |
0.004310738 |
| Marked as misclassified |
No |
| Message-id |
<1281971877.98.0.587739700369.issue7902@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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") |
|