[pypy-svn] r48392 - pypy/dist/pypy/objspace/flow/test

tismer at codespeak.net tismer at codespeak.net
Thu Nov 8 04:36:47 CET 2007


Author: tismer
Date: Thu Nov  8 04:36:46 2007
New Revision: 48392

Added:
   pypy/dist/pypy/objspace/flow/test/test___import_.py
Log:
adding a tiny check for sc_import annotator functionality

Added: pypy/dist/pypy/objspace/flow/test/test___import_.py
==============================================================================
--- (empty file)
+++ pypy/dist/pypy/objspace/flow/test/test___import_.py	Thu Nov  8 04:36:46 2007
@@ -0,0 +1,12 @@
+from py.test import raises
+
+def test___import_():
+    import os
+    mod = os.name
+    raises(TypeError, __import__, ())
+    x = __import__(mod)
+    x = __import__(mod, None)
+    x = __import__(mod, None, None)
+    x = __import__(mod, None, None, None)
+    raises(TypeError, __import__, (mod, None, None, None, None))
+    # XXX this will have to be adjusted for Python 2.5 pretty soon-ish :-)
\ No newline at end of file



More information about the Pypy-commit mailing list