diff --git a/Lib/test/test_multibytecodec_support.py b/Lib/test/test_multibytecodec_support.py --- a/Lib/test/test_multibytecodec_support.py +++ b/Lib/test/test_multibytecodec_support.py @@ -344,5 +344,9 @@ class TestBase_Mapping(unittest.TestCase self.assertEqual(str(csetch, self.encoding), unich) def load_teststring(encoding): - from test import cjkencodings_test - return cjkencodings_test.teststring[encoding] + dir = os.path.join(os.path.dirname(__file__), 'cjkencodings') + with open(os.path.join(dir, encoding + '.txt'), 'rb') as f: + encoded = f.read() + with open(os.path.join(dir, encoding + '-utf8.txt'), 'rb') as f: + utf8 = f.read() + return encoded, utf8