File: test_proc.py

package info (click to toggle)
devpi-common 3.2.2-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 248 kB
  • sloc: python: 1,552; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 369 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import pytest
import py
from devpi_common.proc import *

@pytest.fixture
def hg():
    hg = py.path.local.sysfind("hg")
    if not hg:
        pytest.skip("no hg")
    return str(hg)

def test_check_output(hg):
    assert check_output([hg, "--version"])

def test_checkoutput_error(hg):
    with pytest.raises(CalledProcessError):
        check_output([hg, "qlwkje"])