(self)
| 65 | |
| 66 | class TestExecArgs(unittest.TestCase): |
| 67 | def test_exec_dunder_file(self): |
| 68 | with tempfile.NamedTemporaryFile(mode="w") as f: |
| 69 | f.write( |
| 70 | dedent( |
| 71 | """\ |
| 72 | import sys |
| 73 | sys.stderr.write(__file__) |
| 74 | sys.stderr.flush()""" |
| 75 | ) |
| 76 | ) |
| 77 | f.flush() |
| 78 | _, stderr = run_with_tty( |
| 79 | [sys.executable] + ["-m", "bpython.curtsies", f.name] |
| 80 | ) |
| 81 | self.assertEqual(stderr.strip(), f.name) |
| 82 | |
| 83 | def test_exec_nonascii_file(self): |
| 84 | with tempfile.NamedTemporaryFile(mode="w") as f: |
nothing calls this directly
no test coverage detected