From: Serhiy Storchaka Date: Sat, 7 Oct 2023 13:01:39 +0000 (+0300) Subject: gh-109848: Make test_rot13_func in test_codecs independent (GH-109850) X-Git-Tag: v3.13.0a1~100 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b987fdb19b981ef6e7f71b41790b5ed4e2064646;p=thirdparty%2FPython%2Fcpython.git gh-109848: Make test_rot13_func in test_codecs independent (GH-109850) --- diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index c899111e1e4c..ff511a625a01 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -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(