(self)
| 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: |
nothing calls this directly
no test coverage detected