-
Notifications
You must be signed in to change notification settings - Fork 12
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
0.15.0: pytest is failing in 47 units #197
Comments
Awesome! If you're using clang 16 or later, there are known issues, and there are fixes to address them. There was also an issue on Fedora, fixed just a few days ago. I usually run Anyway, I'm aiming to fix the clang 16 related issues and hopefully also the pytest issue and make a new release within a week or so. |
clang 17.0.3
I don't see anything on https://src.fedoraproject.org/rpms/clang/commits/rawhide |
🥳
Missing this one. Could help in case it's something new to v17, which I don't think anyone had reported trying before. |
@jnikula Thx to let me know 👍
Gosh .. sorry. |
No problem, I think those are all covered by the mentioned PRs. If you get the chance to test the current master with #190 applied, let us know though ;) |
OK one sec .. |
OK just made manual test without my build automation + rm -rf hawkmoth-0.15.0
+ /usr/lib/rpm/rpmuncompress -x /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-0.15.0.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd hawkmoth-0.15.0
+ rm -rf /home/tkloczko/rpmbuild/BUILD/hawkmoth-0.15.0/SPECPARTS
+ /usr/bin/mkdir -p /home/tkloczko/rpmbuild/BUILD/hawkmoth-0.15.0/SPECPARTS
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-github-bump-stable-version-to-v0.15.0.patch
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-build-rename-license_file-to-license_files-in-setup..patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-version-bump-development-version-to-0.16.0.dev0.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-github-generate-documentation-version-matrix-dynamic.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-doc-fix-Sphinx-intersphinx-references.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-doc-update-some-links-based-on-make-linkcheck.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docstring-explicitly-add-blank-line-cushions-to-head.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docstring-make-RootDocstring-a-subclass-of-_Compound.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docstring-EnumClassDocstring-inherits-from-_Compound.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docstring-move-child-handling-under-_CompoundDocstri.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-build-add-check-rst-target-to-lint-rst.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-github-run-rst-lint.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-parser-always-normalize-_Bool-to-bool.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-test-add-tests-for-stdbool-_Bool-bool-fixups.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-parser-workaround-cursor.get_tokens-issue-with-macro.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-build-update-doc-Makefile.local-from-sphinx-quicksta.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-doc-drop-project-root-from-sys.path.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-doc-clean-up-conf.py.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-test-clean-up-conf.py.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docker-move-Dockerfile.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docker-update-Dockerfile.debian-bullseye.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docker-better-parametrize-the-image-building-and-tes.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docker-add-Dockerfile.debian-bookworm-and-Dockerfile.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docker-add-Dockerfile.fedora-37-and-docker-Dockerfil.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-test-query-system-include-args-from-clang.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-parser-fix-parsing-of-anonymous-entities-with-clang-16+.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-fix_module_path_in_conf.py.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-man3_level.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ RPM_EC=0
[..]
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-hawkmoth-0.15.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-hawkmoth-0.15.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.2, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/hawkmoth-0.15.0
collected 264 items
test/test_cautodoc.py .............x.......................x.........................................x.......................x............................ [ 50%]
test/test_cli.py ssssss.......x........ssssss.........x...........s.sssssss.s.s..s. [ 75%]
test/test_parser.py .............x.......................x............................ [100%]
===================================================================================== warnings summary ======================================================================================
test/test_cautodoc.py:73
/home/tkloczko/rpmbuild/BUILD/hawkmoth-0.15.0/test/test_cautodoc.py:73: PytestUnknownMarkWarning: Unknown pytest.mark.full - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.full
test/test_cli.py:93
/home/tkloczko/rpmbuild/BUILD/hawkmoth-0.15.0/test/test_cli.py:93: PytestUnknownMarkWarning: Unknown pytest.mark.full - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.full
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================== short test summary info ==================================================================================
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53539610> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc5353f3d0> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc535f4310> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc5354b670> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc535426a0> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc5354b520> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc534b8340> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc5353fc70> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc535332b0> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53520400> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53527880> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc534b8520> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53539c70> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53533850> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53533ee0> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc534d3d30> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc534d3490> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53539580> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53539700> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc534d3130> directive test
SKIPPED [2] test/test_cli.py:68: cli does not support generic transformations
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53539f70> directive test
XFAIL test/test_cautodoc.py::test_directive_text[c/meta-expected-failure] - reason:
XFAIL test/test_cautodoc.py::test_directive_text[cpp/meta-expected-failure] - reason:
XFAIL test/test_cautodoc.py::test_directive_html[c/meta-expected-failure] - reason:
XFAIL test/test_cautodoc.py::test_directive_html[cpp/meta-expected-failure] - reason:
XFAIL test/test_cli.py::test_cli[c/meta-expected-failure] - reason:
XFAIL test/test_cli.py::test_cli[cpp/meta-expected-failure] - reason:
XFAIL test/test_parser.py::test_parser[c/meta-expected-failure] - reason:
XFAIL test/test_parser.py::test_parser[cpp/meta-expected-failure] - reason:
================================================================== 233 passed, 23 skipped, 8 xfailed, 2 warnings in 39.80s ================================================================== So it works now 👍 😄 (+/- those pytest warnings 😋) Wold you accept PR with below patch? --- a/doc/conf.py
+++ b/doc/conf.py
@@ -5,6 +5,7 @@
import os
import sys
+sys.path.insert(0, os.path.abspath('../src'))
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information It allows build documention out of only source tree without have + /usr/bin/sphinx-build -n -T -b man doc build/sphinx/man
Running Sphinx v7.1.2
making output directory... done
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://www.sphinx-doc.org/en/master/objects.inv...
building [mo]: targets for 0 po files that are out of date
writing output...
building [man]: all manpages
updating environment: [new config] 9 added, 0 changed, 0 removed
reading sources... [100%] troubleshooting
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-hawkmoth.3 { installation extension directives syntax examples extending built-in-extensions troubleshooting } done
build succeeded.
The manual pages are in build/sphinx/man. 🤔 |
Thanks! I haven't seen those warnings before, may be something new in pytest. I'll have a look later.
See #153. I personally would like that, but it's being kept out deliberately. |
That above patch is not about testing but about rendering documentation (only) 😋 |
All fixes merged, closing. #199 should additionally fix the pytest warnings Again, thanks for the report! |
The reason we don't have this in docs or tests is to ensure they all work with the installed package. Building the docs is also part of testing in the sense that they dogfood the package in a normal Sphinx setting instead of in a pytest suite. Some time ago I managed to do a release where all tests passed, but you couldn't actually use the package. Quite embarrassing. That's when I added the With that in mind, can you think of other alternatives to handle this?
Never tried this, actually. The man page turns out pretty nice considering zero effort was put into it! |
|
With installed I meant an editable install in a virtual environment, for development. But I don't claim to be anywhere close to a Python packaging expert. I'll need to revisit this part. In the mean time, 0.16.0 is out, hopefully with the other issues fixed. |
Nothing in the conf.py requires editable module.
BTW releases .. is it possible to start making github releases?🤔 I'm asking because my automation process uses those email notifications by trying to make preliminary automated upgrades of building packages, which allows saving some time on maintaining packaging procedures. Documentation and examples of generate gh releases: |
And yet another note about that one line modification. |
Copied the relevant comments about building documentation without installed package to a new issue #203 |
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulescut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest summary output:
Here is list of installed modules in build env
The text was updated successfully, but these errors were encountered: