summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-04-16 00:28:21 (GMT)
committerGuido van Rossum <guido@python.org>2001-04-16 00:28:21 (GMT)
commit42f92da307dfa466bc7d665c4e717af47c27d393 (patch)
tree048b2c87914599faf1a19e0ae5415a59d31b503d /Lib
parent13324e1e1fc2fe50f4344c65ace88a1e037aa23a (diff)
downloadcpython-42f92da307dfa466bc7d665c4e717af47c27d393.zip
cpython-42f92da307dfa466bc7d665c4e717af47c27d393.tar.gz
cpython-42f92da307dfa466bc7d665c4e717af47c27d393.tar.bz2
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".
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/pickletester.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index 8014efe..edef37c 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -31,7 +31,7 @@ a""" + \
p4
g4
""" + \
-"""(ipickletester
+"""(i__main__
C
p5
""" + \
@@ -54,7 +54,7 @@ BINDATA = ']q\x01(K\x00L1L\nG@\x00\x00\x00\x00\x00\x00\x00' + \
'\x00G\x00\x00\x00\x00\x00\x00\x00\x00tRq\x03K\x01J\xff\xff' + \
'\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' + \
+ '\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.'
@@ -64,6 +64,7 @@ class C:
import __main__
__main__.C = C
+C.__module__ = "__main__"
# Call this with the module to be tested (pickle or cPickle).