-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make python setup.py test
work
#39
Conversation
setup.py
Outdated
@@ -24,6 +24,9 @@ | |||
packages=setuptools.find_packages(exclude=['*checkup*']), | |||
include_package_data=True, | |||
package_data={'': [os.path.join('qcelemental', 'data', '*.json')]}, | |||
setup_requires=[ | |||
'pytest-runner' | |||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that python setup.py install
will fail if pietist is not present?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably, pytest-dev/pytest#3814 . :-(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do:
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []
# ...
setup(
#...
setup_requires=[
#... (other setup requirements)
] + pytest_runner,
)
as the suggested workaround?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just pushed :-)
we've always run
pytest
directly.setup.py
was calling unittest, hence the error. followed this to make it work. fixes #38.