MCPcopy Create free account
hub / github.com/bpython/bpython / test_exec_nonascii_file

Method test_exec_nonascii_file

bpython/test/test_args.py:83–97  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

81 self.assertEqual(stderr.strip(), f.name)
82
83 def test_exec_nonascii_file(self):
84 with tempfile.NamedTemporaryFile(mode="w") as f:
85 f.write(
86 dedent(
87 """\
88 # coding: utf-8
89 "你好 # nonascii"
90 """
91 )
92 )
93 f.flush()
94 _, stderr = run_with_tty(
95 [sys.executable, "-m", "bpython.curtsies", f.name],
96 )
97 self.assertEqual(len(stderr), 0)
98
99 def test_exec_nonascii_file_linenums(self):
100 with tempfile.NamedTemporaryFile(mode="w") as f:

Callers

nothing calls this directly

Calls 3

run_with_ttyFunction · 0.85
writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected