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

Method test_encode_file

Lib/test/test_base64.py:1422–1426  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1420 return script_helper.assert_python_ok('-m', 'base64', *args).out
1421
1422 def test_encode_file(self):
1423 with open(os_helper.TESTFN, 'wb') as fp:
1424 fp.write(b'a\xffb\n')
1425 output = self.get_output('-e', os_helper.TESTFN)
1426 self.assertEqual(output.rstrip(), b'Yf9iCg==')
1427
1428 def test_encode_from_stdin(self):
1429 with script_helper.spawn_python('-m', 'base64', '-e') as proc:

Callers

nothing calls this directly

Calls 5

get_outputMethod · 0.95
openFunction · 0.50
writeMethod · 0.45
assertEqualMethod · 0.45
rstripMethod · 0.45

Tested by

no test coverage detected