python setup.py test produces failures on all rst files
See original GitHub issueIf I simply follow the “How to make a code contribution” and do:
mkvirtualenv astropy --python `which python3`
pip install -e .
python setup.py test
I get a very large number of failures, one for every rst file (that contains a doctest?). They look like:
___________________________________________ [doctest] docs/whatsnew/3.2.rst ___________________________________________
/home/archibald/.virtualenvs/astropy/lib/python3.7/site-packages/pluggy/hooks.py:289: in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
/home/archibald/.virtualenvs/astropy/lib/python3.7/site-packages/pluggy/manager.py:87: in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
/home/archibald/.virtualenvs/astropy/lib/python3.7/site-packages/pluggy/manager.py:81: in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
.eggs/pytest-5.1.1-py3.7.egg/_pytest/runner.py:117: in pytest_runtest_call
item.runtest()
.eggs/pytest_doctestplus-0.3.0-py3.7.egg/pytest_doctestplus/plugin.py:163: in runtest
extraglobs=dict(getfixture=fixture_request.getfuncargvalue),
E AttributeError: 'FixtureRequest' object has no attribute 'getfuncargvalue'
I note that this happens whether or not I have installed pytest-astropy
. By contrast, astropy.test()
does appear to work (once I have installed the additional package):
============================= 11798 passed, 1004 skipped, 69 xfailed in 124.32s (0:02:04) =============================
$ pip list
Package Version Location
------------------ ------------ ----------------------------------------
astropy 4.0.dev25616 /home/archibald/projects/astropy/astropy
atomicwrites 1.3.0
attrs 19.1.0
filelock 3.0.12
importlib-metadata 0.19
more-itertools 7.2.0
numpy 1.17.1
packaging 19.1
pip 19.2.3
pkg-resources 0.0.0
pluggy 0.12.0
psutil 5.6.3
py 1.8.0
pyparsing 2.4.2
pytest 5.1.1
pytest-arraydiff 0.3
pytest-astropy 0.5.0
pytest-doctestplus 0.3.0
pytest-openfiles 0.4.0
pytest-remotedata 0.3.2
setuptools 41.2.0
six 1.12.0
toml 0.10.0
tox 3.13.2
virtualenv 16.7.4
wcwidth 0.1.7
wheel 0.33.6
zipp 0.6.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
`python setup.py test` fails because of strange working directory
Hello. I have an issue while running test in my project. As one could notice I could successfully run mypy from command line...
Read more >Why isn't my setup.py long description showing on pypi?
It's meant to read through my README.rst but it is just blank on pypi. docutils rst2html isn't throwing any errors, setup.py --long-description ...
Read more >Testing Guidelines — Astropy v0.4.2
The safest way to run the astropy test suite is via the setup command test. This is invoked by running python setup.py test...
Read more >Knowledge Bits — Common Python Packaging Mistakes
I think we can all agree that packaging a Python project is harder than ... setup.py/pyproject.toml file, and various other files from your ......
Read more >2. Writing the Setup Script — Python 3.11.1 documentation
The setup script is the centre of all activity in building, distributing, ... you are promising that the Distutils will find a file...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is a known issue with pytest 5.1 - see e.g. #9136. Not sure what the status of the proposed fixes is; for the time being can you try downgrading your pytest installation to < 5.1 (5.0.x)?
pytest-doctestplus
has had a new release since opening this issue, so this should not be an issue any more. (One might need a git clean as suggested above, but nevertheless the issue has been solved with 0.4.0)