MCPcopy Index your code
hub / github.com/python/cpython / test_rot13_func

Method test_rot13_func

Lib/test/test_codecs.py:3862–3871  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3860 $ echo "Hello World" | python -m encodings.rot_13
3861 """
3862 def test_rot13_func(self):
3863 from encodings.rot_13 import rot13
3864 infile = io.StringIO('Gb or, be abg gb or, gung vf gur dhrfgvba')
3865 outfile = io.StringIO()
3866 rot13(infile, outfile)
3867 outfile.seek(0)
3868 plain_text = outfile.read()
3869 self.assertEqual(
3870 plain_text,
3871 'To be, or not to be, that is the question')
3872
3873
3874class CodecNameNormalizationTest(unittest.TestCase):

Callers

nothing calls this directly

Calls 4

rot13Function · 0.90
seekMethod · 0.45
readMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected