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

tismer at codespeak.net tismer at codespeak.net
Mon Jun 5 15:21:27 CEST 2006


Author: tismer
Date: Mon Jun  5 15:21:27 2006
New Revision: 28330

Modified:
   pypy/dist/pypy/interpreter/test/test_pickle.py
Log:
small cleanups. Missing last spot: what to do about frame.last_exception?

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 15:21:27 2006
@@ -162,7 +162,6 @@
         f2     = pickle.loads(pckl)
 
     def test_pickle_traceback(self):
-        #skip("in-progress: recursion problem")
         def f():
             try:
                 raise Exception()
@@ -181,33 +180,6 @@
         assert tb.tb_lineno == result.tb_lineno
         assert tb.tb_next == result.tb_next
 
-        #XXX silly code duplication from frame pickling test
-        f1 = tb.tb_frame
-        f2 = result.tb_frame
-        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 f1.f_builtins is f2.f_builtins
-        assert f1.f_code == f2.f_code
-        assert f1.f_exc_traceback is f2.f_exc_traceback
-        assert f1.f_exc_type is f2.f_exc_type
-        assert f1.f_exc_value is f2.f_exc_value
-
-        #print 'f1.f_globals =', f1.f_globals #f1.f_globals = {'__builtins__': <module object at 0x0167dc70>, '__name__': '__builtin__', 'test_pickle_frame': <function test_pickle_frame at 0x0237adb0>}
-        #print 'f2.f_globals=', f2.f_globals  #f2.f_globals= {'__builtins__': <module object at 0x0167dc70>, '__name__': '__builtin__', 'test_pickle_frame': <function test_pickle_frame at 0x02c346f0>}
-        #assert f1.f_globals == f2.f_globals  #XXX test_pickle_frame function not same identity (see pickle func tests, we don't compare by identity there!)?
-
-        assert f1.f_lasti == f2.f_lasti
-        assert f1.f_lineno == f2.f_lineno
-
-        #print 'f1.f_locals=', f1.f_locals     #['exc_info', 'tb', 'exc_type', 'exc']
-        #print 'f2.f_locals=', f2.f_locals   #[]
-        #assert list(f1.f_locals) == list(f2.f_locals)
-
-        assert f1.f_restricted is f2.f_restricted
-        assert f1.f_trace is f2.f_trace
-
         restore_top_frame(tb.tb_frame, saved)
 
     def test_pickle_module(self):



More information about the Pypy-commit mailing list