Open mtelka opened 1 year ago
This is the quick and dirty workaround:
--- persistent-5.0/src/persistent/tests/test_docs.py.orig
+++ persistent-5.0/src/persistent/tests/test_docs.py
@@ -36,7 +36,7 @@
prev, here = here, os.path.dirname(here)
if here == prev:
# Let's avoid infinite loops at root
- raise AssertionError('could not find my setup.py')
+ return unittest.TestSuite()
docs = os.path.join(here, 'docs', 'api')
Marcel Telka wrote at 2023-8-10 06:38 -0700:
This is the quick and dirty workaround:
--- persistent-5.0/src/persistent/tests/test_docs.py.orig +++ persistent-5.0/src/persistent/tests/test_docs.py @@ -36,7 +36,7 @@ prev, here = here, os.path.dirname(here) if here == prev: # Let's avoid infinite loops at root - raise AssertionError('could not find my setup.py') + return unittest.TestSuite()
I do not think this is the right solution.
Are you sure you are running the tests correctly?
When I run the tests on master
with
zope-testrunner --test-path ../persistent/src/ -v
,
I get
Ran 771 tests with 0 failures, 0 errors and 6 skipped in 0.399 seconds.
```.
(I am in a sibling folder of `persistent`).
Yes, when the test is run in the git repo (or in sdist) then it pass. I'm talking about wheel. There is no setup.py
in the wheel so test_docs.py
cannot pass there. Maybe the better solution would be just to exclude test_docs.py
from wheel. Or, maybe even better, simply exclude all tests from wheel?
Marcel Telka wrote at 2023-8-10 08:22 -0700:
Yes, when the test is run in the git repo (or in sdist) then it pass. I'm talking about wheel. There is no
setup.py
in the wheel sotest_docs.py
cannot pass there. Maybe the better solution would be just to excludetest_docs.py
from wheel. Or, maybe even better, simply exclude all tests from wheel?
You are right!
I think a good solution would be to skrip the test in this case
(with the explaining message setup.py unavailable
).
Would you like to sign a contributor agreement and provide a pull request?
Would you like to sign a contributor agreement ...
Sorry, no.
The
test_docs.py
included in wheel fails with the following assertion:Maybe the test should pass (or skip) instead of failure if there is no
setup.py
available.