]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] 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:24:27 +0000 (06:24 -0700)
committerGitHub <noreply@github.com>
Sat, 7 Oct 2023 13:24:27 +0000 (13:24 +0000)
(cherry picked from commit b987fdb19b981ef6e7f71b41790b5ed4e2064646)

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

index 684e6cf75154812c80835a491609c58d2e01a650..a7440eea67c10162efc0af5b6f9e57a8768d2b6d 100644 (file)
@@ -3590,9 +3590,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(