summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-10-07 13:24:27 (GMT)
committerGitHub <noreply@github.com>2023-10-07 13:24:27 (GMT)
commitaf168df78f260a809875b309f35fbf38b58c1fec (patch)
tree19bcead85b964d93cea41c46b78e251614f99f64
parent682321292f0f342a88311495418ef6f84e4eb452 (diff)
downloadcpython-af168df78f260a809875b309f35fbf38b58c1fec.zip
cpython-af168df78f260a809875b309f35fbf38b58c1fec.tar.gz
cpython-af168df78f260a809875b309f35fbf38b58c1fec.tar.bz2
[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 <storchaka@gmail.com>
-rw-r--r--Lib/test/test_codecs.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
index 684e6cf..a7440ee 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(