From 9fe17cac87b88153b6e5933164293f617d76b9ff Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 25 Sep 2023 18:16:12 +0300 Subject: [PATCH] gh-109848: Make test_rot13_func in test_codecs independent --- Lib/test/test_codecs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index b5e9271ac0c3cd..5dc5b1acf10f74 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -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(