[pypy-svn] r28310 - pypy/dist/pypy/interpreter/test

tismer at codespeak.net tismer at codespeak.net
Mon Jun 5 11:40:36 CEST 2006


Author: tismer
Date: Mon Jun  5 11:40:35 2006
New Revision: 28310

Modified:
   pypy/dist/pypy/interpreter/test/test_pickle.py
Log:
changed test case for the frame hiding patch

Modified: pypy/dist/pypy/interpreter/test/test_pickle.py
==============================================================================
--- pypy/dist/pypy/interpreter/test/test_pickle.py	(original)
+++ pypy/dist/pypy/interpreter/test/test_pickle.py	Mon Jun  5 11:40:35 2006
@@ -113,13 +113,14 @@
         assert not (cell != result)
 
     def test_pickle_frame(self):
-        skip("in-progress")
-        from sys import exc_info
+        #import sys
+        # avoid creating a closure for now
         def f():
             try:
                 raise Exception()
             except:
-                exc_type, exc, tb = exc_info()
+                import sys
+                exc_type, exc, tb = sys.exc_info()
                 return tb.tb_frame
         import pickle
         f1     = f()
@@ -131,7 +132,7 @@
         assert type(f1) is type(f2)
         assert dir(f1) == dir(f2)
         assert f1.__doc__ == f2.__doc__
-        assert type(f1.f_back) is type(f2.f_back)
+        assert f2.f_back is None # mecause we pruned it
         assert f1.f_builtins is f2.f_builtins
         assert f1.f_code == f2.f_code
         assert f1.f_exc_traceback is f2.f_exc_traceback



More information about the Pypy-commit mailing list