From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 7 Oct 2023 13:24:27 +0000 (-0700) Subject: [3.11] gh-109848: Make test_rot13_func in test_codecs independent (GH-109850) (GH... X-Git-Tag: v3.11.7~230 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=af168df78f260a809875b309f35fbf38b58c1fec;p=thirdparty%2FPython%2Fcpython.git [3.11] gh-109848: Make test_rot13_func in test_codecs independent (GH-109850) (GH-110505) (cherry picked from commit b987fdb19b981ef6e7f71b41790b5ed4e2064646) Co-authored-by: Serhiy Storchaka --- diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index 684e6cf75154..a7440eea67c1 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -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(