mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
118469db3b
Changed PIPENV_SUPPRESS_NESTED_WARNING to PIPENV_VERBOSITY, an integer value that defaults to 0 (verbose). Changed test in test_core.py to use capsys to capture standard output/error in order to improve compatibility with Python 2.
16 lines
468 B
Python
16 lines
468 B
Python
import pytest
|
|
import mock
|
|
|
|
from pipenv.core import warn_in_virtualenv
|
|
|
|
|
|
@mock.patch('pipenv.environments.PIPENV_VIRTUALENV', 'totallyrealenv')
|
|
@mock.patch('pipenv.environments.PIPENV_VERBOSITY', 1)
|
|
@pytest.mark.core
|
|
def test_suppress_nested_venv_warning(capsys):
|
|
# Capture the stderr of warn_in_virtualenv to test for the presence of the
|
|
# courtesy notice.
|
|
warn_in_virtualenv()
|
|
output, err = capsys.readouterr()
|
|
assert 'Courtesy Notice' not in err
|