Skip to content
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

Merged
merged 2 commits into from
Mar 4, 2019
Merged

make python setup.py test work #39

merged 2 commits into from
Mar 4, 2019

Conversation

loriab
Copy link
Collaborator

@loriab loriab commented Mar 4, 2019

we've always run pytest directly. setup.py was calling unittest, hence the error. followed this to make it work. fixes #38.

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'
],
Copy link
Collaborator

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?

Copy link
Collaborator Author

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 . :-(

Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just pushed :-)

@codecov
Copy link

codecov bot commented Mar 4, 2019

Codecov Report

Merging #39 into master will not change coverage.
The diff coverage is n/a.

@dgasmith dgasmith added Enhancement Project enhancement discussion Testing Testing bug or enhancement labels Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Project enhancement discussion Testing Testing bug or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests not working
2 participants