File: test_command.py

package info (click to toggle)
flit 3.12.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,504 kB
  • sloc: python: 6,691; makefile: 175; sh: 27
file content (13 lines) | stat: -rw-r--r-- 460 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
from subprocess import Popen, PIPE, STDOUT
import sys

def test_flit_help():
    p = Popen([sys.executable, '-m', 'flit', '--help'], stdout=PIPE, stderr=STDOUT)
    out, _ = p.communicate()
    assert 'Build wheel' in out.decode('utf-8', 'replace')

def test_flit_usage():
    p = Popen([sys.executable, '-m', 'flit'], stdout=PIPE, stderr=STDOUT)
    out, _ = p.communicate()
    assert 'Build wheel' in out.decode('utf-8', 'replace')
    assert p.poll() == 1