]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-109848: Make test_rot13_func in test_codecs independent (GH-109850) (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 7 Oct 2023 13:39:19 +0000 (06:39 -0700)
committerGitHub <noreply@github.com>
Sat, 7 Oct 2023 13:39:19 +0000 (13:39 +0000)
(cherry picked from commit b987fdb19b981ef6e7f71b41790b5ed4e2064646)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_codecs.py

index b5e9271ac0c3cdca98f31497ac7a5a571ee87825..5dc5b1acf10f74e323ce573a7fbd1cdabdfc3970 100644 (file)
@@ -3567,9 +3567,10 @@ class Rot13UtilTest(unittest.TestCase):
     $ echo "Hello World" | python -m encodings.rot_13
     """
     def test_rot13_func(self):
+        from encodings.rot_13 import rot13
         infile = io.StringIO('Gb or, be abg gb or, gung vf gur dhrfgvba')
         outfile = io.StringIO()
-        encodings.rot_13.rot13(infile, outfile)
+        rot13(infile, outfile)
         outfile.seek(0)
         plain_text = outfile.read()
         self.assertEqual(