Skip to content

Commit 8e158b2

Browse files
[2.7] bpo-30223: Fix test_xpickle for Python 2.4. (#1395)
1 parent 43566ae commit 8e158b2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Lib/test/pickletester.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
from __future__ import absolute_import
3-
42
import unittest
53
import pickle
64
import cPickle
@@ -169,7 +167,7 @@ def __reduce__(self):
169167
# Shouldn't support the recursion itself
170168
return K, (self.value,)
171169

172-
import __main__
170+
__main__ = sys.modules['__main__']
173171
__main__.C = C
174172
C.__module__ = "__main__"
175173
__main__.D = D

0 commit comments

Comments
 (0)