Repository: HypothesisWorks/hypothesis

Issue:
Can't run tests with pytest-2.7
Example test launch for `pytest28`

``` sh
[11:29] igor@nixos-pc hypothesis-3.5.2-src [nix-shell] % tox -e pytest28
GLOB sdist-make: /tmp/ttt/hypothesis-3.5.2-src/setup.py
pytest28 create: /tmp/ttt/hypothesis-3.5.2-src/.tox/pytest28
pytest28 installdeps: pytest==2.8.2
pytest28 inst: /tmp/ttt/hypothesis-3.5.2-src/.tox/dist/hypothesis-3.5.2.zip
pytest28 installed: hypothesis==3.5.2,py==1.4.31,pytest==2.8.2,spark-parser==1.4.0,uncompyle6==2.9.3,xdis==3.2.0
pytest28 runtests: PYTHONHASHSEED='2598812601'
pytest28 runtests: commands[0] | python -m pytest tests/pytest tests/cover/test_testdecorators.py
============================================================================================================ test session starts ============================================================================================================
platform linux -- Python 3.5.2, pytest-2.8.2, py-1.4.31, pluggy-0.3.1 -- /tmp/ttt/hypothesis-3.5.2-src/.tox/pytest28/bin/python
cachedir: .cache
rootdir: /tmp/ttt/hypothesis-3.5.2-src, inifile: tox.ini
plugins: hypothesis-3.5.2
collected 80 items 

tests/pytest/test_capture.py::test_output_without_capture[no-True] PASSED
tests/pytest/test_capture.py::test_output_without_capture[fd-False] PASSED
...
======================================================================================================== 80 passed in 10.76 seconds =========================================================================================================
__________________________________________________________________________________________________________________ summary __________________________________________________________________________________________________________________
  pytest28: commands succeeded
  congratulations :)
```

Example for `pytest27`

``` sh
[11:15] igor@nixos-pc hypothesis-3.5.2-src [nix-shell] % tox -e pytest27
GLOB sdist-make: /tmp/ttt/hypothesis-3.5.2-src/setup.py
pytest27 create: /tmp/ttt/hypothesis-3.5.2-src/.tox/pytest27
pytest27 installdeps: pytest==2.7.3
pytest27 inst: /tmp/ttt/hypothesis-3.5.2-src/.tox/dist/hypothesis-3.5.2.zip
pytest27 installed: hypothesis==3.5.2,py==1.4.31,pytest==2.7.3,spark-parser==1.4.0,uncompyle6==2.9.3,xdis==3.2.0
pytest27 runtests: PYTHONHASHSEED='3026809842'
pytest27 runtests: commands[0] | python -m pytest tests/pytest tests/cover/test_testdecorators.py
usage: pytest.py [options] [file_or_dir] [file_or_dir] [...]
pytest.py: error: unrecognized arguments: --runpytest=subprocess
ERROR: InvocationError: '/tmp/ttt/hypothesis-3.5.2-src/.tox/pytest27/bin/python -m pytest tests/pytest tests/cover/test_testdecorators.py'
__________________________________________________________________________________________________________________ summary __________________________________________________________________________________________________________________
ERROR:   pytest27: commands failed
```

It seems that there is no `--runpytest=subprocess` flag for `pytest-2.7`.

Didn't try 3.5.3 version. But they have the same `tox.ini`. I suspect the same behaviour.
This is reproducable for `python27` and `python35`.



Discussion:
That's probably mostly a sign that task should be deleted. pytest27 isn't actually part of the Travis build any more. Is there a specific reason you want to?

No, I don't have a spectific reason. I launched tests for PyLTI that uses `pytest-2.7` and noticed that one of the dependents can't pass all tests. However, it meets requirements (`setup.py`): `pytest>=2.7.0`. It would be better to clean up requirements and `tox.ini`.


Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -42,7 +42,7 @@ def local_file(name):
     'fakefactory': ["Faker>=0.7.0,<=0.7.1"],
     'django': ['pytz', 'django>=1.7'],
     'numpy': ['numpy>=1.9.0'],
-    'pytest': ['pytest>=2.7.0'],
+    'pytest': ['pytest>=2.8.0'],
 }
 
 extras['faker'] = extras['fakefactory']


Test patch: