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 pytest-runner conditional #418

Merged
merged 2 commits into from
Jan 10, 2020
Merged

Make pytest-runner conditional #418

merged 2 commits into from
Jan 10, 2020

Conversation

koobs
Copy link
Contributor

@koobs koobs commented Dec 20, 2019

pytest runner should not be unconditionally included in setup_requires

This change makes it conditional on setup.py invocation arguments as recommended upstream [1]

See: pytest-dev/pytest#3814

Identified via: FreeBSD Ports Bug 242065

Closes #417
Closes #420

[1] https://pytest-runner.readthedocs.io/en/latest/#conditional-requirement

pytest runner should not be unconditionally included in setup_requires

This change makes it conditional on setup.py invocation arguments as recommended upstream [1]

See: pytest-dev/pytest#3814

[1] https://pytest-runner.readthedocs.io/en/latest/#conditional-requirement
setup.py Outdated Show resolved Hide resolved
@blueyed
Copy link
Contributor

blueyed commented Dec 20, 2019

I wonder if it shouldn't be removed completely? (as it appears to have been the plan with #417)

@ngie-eign
Copy link

ngie-eign commented Dec 20, 2019

@blueyed: I personally would prefer pytest-runner for end-user usability/consistency, and as a packager, having to install tox to run the tests requires a different raft of packages than pytest-runner would increase the package dependency footprint on a test host.

@koobs
Copy link
Contributor Author

koobs commented Dec 25, 2019

@blueyed: I personally would prefer pytest-runner for end-user usability/consistency, and as a packager, having to install tox to run the tests requires a different raft of packages than pytest-runner would increase the package dependency footprint on a test host.

+1 and likewise, and not only from a dependency footprint, but more importantly, tox isn't a required test dependency for 'distribution', in the sense that it is just a wrapper to run other test tools (pytest, nose, unittest, et al) and provides isolation and other features relevant to 'development'.

Any forced requirement to use tox outside of development, just makes testing packages that much harder, as we (users, packagers, non-development consumers) need to:

  • Test against the python packages the system provides or has installed (not what is specified by tox or requirements.txt)
  • Disable network dependency resolution/fetching (isolated / clean room builds and testing)
  • Jump through hoops to get packages to test against (inherit from) the system Python environment

The distinction between development testing automation, and end user / consumer test-ability against what the system (packages) provides is key, same as there is a distinction between setup.py:*_requires for distribution and requirements.txt for deployment.

@justinmk
Copy link
Member

@justinmk
Copy link
Member

justinmk commented Jan 9, 2020

@blueyed coverage tool looks broken, any idea how to fix it?

blueyed added a commit to blueyed/python-client that referenced this pull request Jan 9, 2020
Fixes:

> INTERNALERROR> coverage.misc.CoverageException: Couldn't use data file '…/.coverage': UNIQUE constraint failed: meta.key

Ref: neovim#418 (comment)
@blueyed blueyed mentioned this pull request Jan 9, 2020
@blueyed
Copy link
Contributor

blueyed commented Jan 9, 2020

@blueyed coverage tool looks broken, any idea how to fix it?

Might be a bug/issue with the new Coveragepy 5.
#421 works around / fixes it.

@justinmk justinmk merged commit f048531 into neovim:master Jan 10, 2020
@ngie-eign
Copy link

@ngie-eign @koobs how does that square with https://github.com/pytest-dev/pytest-runner#deprecation-notice ?

:(... I kind of liked the support, but what can I say? I'm not the upstream pytest-runner maintainer :/..

@koobs
Copy link
Contributor Author

koobs commented Jan 11, 2020

@ngie-eign @koobs how does that square with https://github.com/pytest-dev/pytest-runner#deprecation-notice ?

Yeh, it's getting harder as a downstream consumer/user to continue to fight for some notion of a 'canonical test command' in Python packages that 'just works', without having to waste time searching upstream documentation for how to run tests, test dependencies, etc

Nevertheless, thank you for taking care of this

@koobs koobs deleted the patch-1 branch January 11, 2020 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unresolved dependency pytest-runner on python 37 install Extra unused dependency?
4 participants