tests/test_command.py
raw| 1 | from subprocess import Popen, PIPE, STDOUT |
| 2 | import sys |
| 3 | |
| 4 | def test_flit_help(): |
| 5 | p = Popen([sys.executable, '-m', 'flit', '--help'], stdout=PIPE, stderr=STDOUT) |
| 6 | out, _ = p.communicate() |
| 7 | assert 'Build wheel' in out.decode('utf-8', 'replace') |
| 8 | |
| 9 | def test_flit_usage(): |
| 10 | p = Popen([sys.executable, '-m', 'flit'], stdout=PIPE, stderr=STDOUT) |
| 11 | out, _ = p.communicate() |
| 12 | assert 'Build wheel' in out.decode('utf-8', 'replace') |
| 13 | assert p.poll() == 1 |