persistent icon indicating copy to clipboard operation
persistent copied to clipboard

zope-testrunner not discovering any tests when working from sdist (pypi archive)

Open apteryks opened this issue 1 year ago • 1 comments

What I did:

I unpack https://files.pythonhosted.org/packages/source/p/persistent/persistent-6.1.tar.gz, then run:

zope-testrunner

I also tried

zope-testrunner --test-path=tests

What I expect to happen:

All tests pass.

What actually happened:

No tests discovered:

Total: 0 tests, 0 failures, 0 errors and 0 skipped in 0.000 seconds.

What version of Python and Zope/Addons I am using:

Guix System (GNU/Linux), Python 3.10.7 and persistent 6.1 with the following inputs:

[email protected] [email protected] [email protected]
+ [email protected] [email protected] [email protected]

apteryks avatar Dec 12 '24 13:12 apteryks

You want --test-path=src as well as --path=src. But by itself that won't work, you can't test persistent without it being built first. You can run python setup.py bdist_ext -i and that gets you part way, but (1) that's deprecated and (2) you'll still be missing test dependencies, so ideally you really need to install the package first along with its [test] extra. You seem to be manually managing test dependencies, though, so good luck!

jamadden avatar Dec 12 '24 13:12 jamadden