Commits

Shashank Bharadwaj committed b5b08ba

new example from test_imports_jy, and this fails

  • Participants
  • Parent commits c00397f

Comments (0)

Files changed (1)

fix-asm-via-cfg.patch

 new file mode 100644
 --- /dev/null
 +++ b/tmp/test.py
-@@ -0,0 +1,18 @@
-+def genNestedDeeply():
-+    for i in range(4):
-+        try:
-+            continue
-+        finally:
-+            yield (i)
-+
-+
-+print 'got:     ', list(genNestedDeeply())
-+
-+def foo():
-+    try:
-+        return 10
-+    finally:
-+        print 'hi'
-+
-+
-+print foo()
+@@ -0,0 +1,19 @@
++import os
++from test_chdir import read, safe_mktemp, COMPILED_SUFFIX
++
++def test_load_compiled(self):
++    compiled = os.__file__
++    if compiled.endswith('.py'):
++        compiled = compiled[:-3] + COMPILED_SUFFIX
++
++    os.__doc__ = 'foo'
++    self.assertEqual(os, imp.load_compiled("os", compiled))
++    self.assertFalse(os.__doc__ == 'foo')
++    with open(compiled, 'rb') as fp:
++        os.__doc__ = 'foo'
++        self.assertEqual(os, imp.load_compiled("os", compiled, fp))
++        self.assertFalse(os.__doc__ == 'foo')
++
++
++
++test_load_compiled()