]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-109848: Make test_rot13_func in test_codecs independent (GH-109850)
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 7 Oct 2023 13:01:39 +0000 (16:01 +0300)
committerGitHub <noreply@github.com>
Sat, 7 Oct 2023 13:01:39 +0000 (16:01 +0300)
Lib/test/test_codecs.py

index c899111e1e4c16bfa18240d9954c691e61f0ae45..ff511a625a0194d8fd3af168afb8fe90001992e9 100644 (file)
@@ -3637,9 +3637,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(