[Python-checkins] CVS: python/dist/src/Lib/test pickletester.py,1.5,1.6

Guido van Rossum gvanrossum@users.sourceforge.net
Sun, 15 Apr 2001 17:28:23 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv2344

Modified Files:
	pickletester.py 
Log Message:
Change the test data to ask for class C from module __main__ rather
than from module pickletester.  Using the latter turned out to cause
the test to break when invoked as "import test.test_pickle" or "import
test.autotest".


Index: pickletester.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/pickletester.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** pickletester.py	2001/04/10 03:41:41	1.5
--- pickletester.py	2001/04/16 00:28:21	1.6
***************
*** 32,36 ****
  g4
  """ + \
! """(ipickletester
  C
  p5
--- 32,36 ----
  g4
  """ + \
! """(i__main__
  C
  p5
***************
*** 55,59 ****
            '\xff\xffK\xffJ\x01\xff\xff\xffJ\x00\xff\xff\xffM\xff\xff' + \
            'J\x01\x00\xff\xffJ\x00\x00\xff\xffJ\xff\xff\xff\x7fJ\x01\x00' + \
!           '\x00\x80J\x00\x00\x00\x80(U\x03abcq\x04h\x04(cpickletester\n' + \
            'C\nq\x05oq\x06}q\x07(U\x03fooq\x08K\x01U\x03barq\tK\x02ubh' + \
            '\x06tq\nh\nK\x05e.'
--- 55,59 ----
            '\xff\xffK\xffJ\x01\xff\xff\xffJ\x00\xff\xff\xffM\xff\xff' + \
            'J\x01\x00\xff\xffJ\x00\x00\xff\xffJ\xff\xff\xff\x7fJ\x01\x00' + \
!           '\x00\x80J\x00\x00\x00\x80(U\x03abcq\x04h\x04(c__main__\n' + \
            'C\nq\x05oq\x06}q\x07(U\x03fooq\x08K\x01U\x03barq\tK\x02ubh' + \
            '\x06tq\nh\nK\x05e.'
***************
*** 65,68 ****
--- 65,69 ----
  import __main__
  __main__.C = C
+ C.__module__ = "__main__"
  
  # Call this with the module to be tested (pickle or cPickle).