MCPcopy Index your code
hub / github.com/bpython/bpython / test_exec_nonascii_file_linenums

Method test_exec_nonascii_file_linenums

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

Source from the content-addressed store, hash-verified

97 self.assertEqual(len(stderr), 0)
98
99 def test_exec_nonascii_file_linenums(self):
100 with tempfile.NamedTemporaryFile(mode="w") as f:
101 f.write(
102 dedent(
103 """\
104 1/0
105 """
106 )
107 )
108 f.flush()
109 _, stderr = run_with_tty(
110 [sys.executable, "-m", "bpython.curtsies", f.name],
111 )
112 self.assertIn("line 1", clean_colors(stderr))
113
114
115def clean_colors(s):

Callers

nothing calls this directly

Calls 4

run_with_ttyFunction · 0.85
clean_colorsFunction · 0.85
writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected