| 1 | import sys |
| 2 | import subprocess |
| 3 | import tempfile |
| 4 | |
| 5 | dir = tempfile.TemporaryDirectory() |
| 6 | cmd = [ |
| 7 | sys.executable, |
| 8 | "-m", |
| 9 | "scalene", |
| 10 | "--cli", |
| 11 | "--outfile", |
| 12 | dir.name, |
| 13 | "../testme.py", |
| 14 | "--cpu-only", |
| 15 | ] |
| 16 | |
| 17 | print(cmd) |
| 18 | print( |
| 19 | f"If bug 691 is fixed, you will see \n scalene: error: outfile {dir.name} is a directory" |
| 20 | ) |
| 21 | proc = subprocess.run(cmd) |