[Python-checkins] r61595 - in python/trunk: Lib/test/relimport.py Lib/test/test_import.py Misc/NEWS Python/ast.c

Neal Norwitz nnorwitz at gmail.com
Wed Mar 19 06:37:55 CET 2008


On Tue, Mar 18, 2008 at 11:39 PM, martin.v.loewis
<python-checkins at python.org> wrote:
> Author: martin.v.loewis
>  Date: Wed Mar 19 05:39:13 2008
>  New Revision: 61595
>
>
>  Modified: python/trunk/Lib/test/test_import.py
>  ==============================================================================
>  --- python/trunk/Lib/test/test_import.py        (original)
>  +++ python/trunk/Lib/test/test_import.py        Wed Mar 19 05:39:13 2008
>  @@ -254,8 +254,20 @@
>          self.assertEqual(mod.testdata, 'test_trailing_slash')
>          unload("test_trailing_slash")
>
>  +class RelativeImport(unittest.TestCase):
>  +    def tearDown(self):
>  +        try:
>  +            del sys.modules["test.relimport"]
>  +        except:
>  +            pass
>  +
>  +    def test_relimport_star(self):
>  +        # This will import * from .test_import.
>  +        import relimport
>  +        self.assertTrue(hasattr(relimport, "RelativeImport"))

Shouldn't "import relimport" be "from test import relimport"?  I think
the latter is required for 3k.

n


More information about the Python-checkins mailing list