问题
I use instructions, that described here
For test I use this command:
py.test --ignore=env
But if I use
python setup.py test
pytest runs all test (+ in env).
How to skip test in env dir?
Thanks!
UPDATE
setup.py:
from setuptools import setup, find_packages
setup(
packages=find_packages(),
setup_requires=['pytest-runner'],
tests_require=['pytest'],
)
回答1:
Consider using the pytest.ini option addopts like this:
# This is pytest.ini in your root directory
[pytest]
addopts = --ignore=env
来源:https://stackoverflow.com/questions/36391135/pytest-with-setup-py-test