[pypy-svn] r4764 - pypy/trunk/src/pypy/module/test

alex at codespeak.net alex at codespeak.net
Mon May 31 16:46:56 CEST 2004


Author: alex
Date: Mon May 31 16:46:55 2004
New Revision: 4764

Modified:
   pypy/trunk/src/pypy/module/test/test_import.py
Log:
added failing test for 'from package import module'



Modified: pypy/trunk/src/pypy/module/test/test_import.py
==============================================================================
--- pypy/trunk/src/pypy/module/test/test_import.py	(original)
+++ pypy/trunk/src/pypy/module/test/test_import.py	Mon May 31 16:46:55 2004
@@ -63,5 +63,13 @@
       self.assert_('pkg.a' in sys.modules)
       self.assertEquals(imamodule, 1)
 
+   def test_from_pkg_import_module(self):
+      import sys
+      sys.path.append('impsubdir')
+      from pkg import a
+      self.assert_('pkg' in sys.modules)
+      self.assert_('pkg.a' in sys.modules)
+      self.assert_(hasattr(a, 'imamodule'))
+
 if __name__ == '__main__':
     testit.main()



More information about the Pypy-commit mailing list