From b9ff362c7cec831fb00cf64f9051be9107b66636 Mon Sep 17 00:00:00 2001 From: Buck Golemon Date: Tue, 30 Dec 2014 15:43:13 -0800 Subject: [PATCH] py26 doesn't have a consistent exit code --- .pre-commit-config.yaml | 2 +- tests/functional/simple_test.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1c3ab34..4d8e6a6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,6 +18,6 @@ hooks: - id: system name: PyLint - entry: python -m pylint + entry: python -m pylint.__main__ language: system files: \.py$ diff --git a/tests/functional/simple_test.py b/tests/functional/simple_test.py index e293054..bca6581 100644 --- a/tests/functional/simple_test.py +++ b/tests/functional/simple_test.py @@ -347,7 +347,9 @@ def test_args_backward(tmpdir): with pytest.raises(CalledProcessError) as excinfo: venv_update('requirements.txt', 'myvenv') - assert excinfo.value.returncode == 1 + # py26 doesn't have a consistent exit code: + # http://bugs.python.org/issue15033 + assert excinfo.value.returncode != 0 _, err = excinfo.value.result lasterr = strip_coverage_warnings(err).rsplit('\n', 2)[-2] errname = 'NotADirectoryError' if PY33 else 'OSError'