mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
e03878d7c7
- Drop pytest-tap - Update azure pipelines config - Borrow ramdisk configuration from pip - Fix pyinstaller ref for python 2 - Add 0-minute timeout and add github workflow - Add skip for pywin32 - Scale down to `-n auto` to reduce race conditions on windows - Skip pywin32 on python 3.8 as the relevant dependencies aren't compatible - Use default pip exists action = ignore to work around VCS race condition - Create local temp directory to avoid crossing drive letter boundary on azure during CI runs - Monkeypatch click windows console detection to return False in CI Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
31 lines
751 B
Python
31 lines
751 B
Python
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.mark.cli
|
|
@pytest.mark.help
|
|
def test_help():
|
|
output = subprocess.check_output(
|
|
[sys.executable, '-m', 'pipenv.help'],
|
|
stderr=subprocess.STDOUT, env=os.environ.copy(),
|
|
)
|
|
assert output
|
|
|
|
|
|
@pytest.mark.cli
|
|
@pytest.mark.help
|
|
def test_count_of_description_pre_option():
|
|
test_command = 'pipenv install --help'
|
|
test_line = '--pre Allow pre-releases.'
|
|
out = subprocess.Popen(test_command.split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
|
stdout, _ = out.communicate()
|
|
lines = stdout.decode().split('\n')
|
|
count = 0
|
|
for line in lines:
|
|
if line.strip().split() == test_line.split():
|
|
count += 1
|
|
assert count == 1
|