Closed kloczek closed 3 months ago
Thank you.
Just started packaging your module and cannot pass pytest. Looks like it is some conflict between tests/backend/conftest.py and tests/conftest.py ๐ค
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/tkloczko/rpmbuild/BUILD/graphviz-0.20.2
configfile: setup.cfg
testpaths: README.rst, docs, graphviz, tests
plugins: hypothesis-6.99.6, mock-3.12.0
collected 369 items / 1 error
========================================================================================== ERRORS ===========================================================================================
____________________________________________________________________________ ERROR collecting tests/conftest.py _____________________________________________________________________________
import file mismatch:
imported module 'conftest' has this __file__ attribute:
/home/tkloczko/rpmbuild/BUILD/graphviz-0.20.2/tests/backend/conftest.py
which is not the same as the test file we want to collect:
/home/tkloczko/rpmbuild/BUILD/graphviz-0.20.2/tests/conftest.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
================================================================================== short test summary info ==================================================================================
ERROR tests/conftest.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================================================== 1 error in 1.10s ======================================================================================
pytest passes scanning test units with --import-mode=importlib
and it fails in two units and shows some warnings
Sorry for longer output but I cannot find where is enabled pytest verbose mode (I cannot find anytinig about that in pytest options in setup.cfg)
Looks like it is some conflict between tests/backend/conftest.py and tests/conftest.py
AFAICT this is due to a bug in pytest 8.1.1
:
See https://github.com/xflr6/graphviz/blob/78daf45dfa779370c542375995d4e59d86d2c1bd/setup.py#L25
pytest passes scanning test units with --import-mode=importlib and it fails in two units
The FAILED
tests hint at an issue with the upstream graphviz
version you are using (or its build dependencies).
Built without jpeg
support?
graphviz.backend.execute.CalledProcessError: Command '[PosixPath('dot'), '-Kdot', '-Tjpeg']' returned non-zero exit status 1.
[stderr: b'Format: "jpeg" not recognized. Use one of: canon cmap cmapx cmapx_np dot dot_json eps fig gv imap imap_np ismap json json0 kitty kittyz mp pdf pic plain plain-ext png pov ps ps2 svg svg_inline svgz tk vt vt-24bit webp x11 xdot xdot1.2 xdot1.4 xdot_json xlib\n']
Built without triangulation library (seems to be the same as https://github.com/xflr6/graphviz/issues/190)?
CompletedProcess(args=[PosixPath('dot'), '-Ksfdp', '-Tsvg'], returncode=1, stdout=b'<?xml version="1.0" encoding="UTF-...">spam</text>\n</g>\n</g>\n</svg>\n',
stderr=b'Error: remove_overlap: Graphviz not built with triangulation library\n')
Both pass here under Ubuntu 22.04.4
with upstream graphviz version 2.43.0
.
Side note: The upstream Windows version has had the triangulation issue for a while now:
and shows some warnings
Thanks. I think pytest
has got more strict about warnings recently. These are all our own warnings about arguments that should be turned into keyword-only arguments (we already check pytest.deprecated_call
for them in some tests, but maybe have missed some or should start using the keyword-argument ourselves):
PendingDeprecationWarning: The signature of save will be reduced to 1 positional arg ['filename']:
pass directory='doctest-output/round-table.gv' as keyword arg(s)
filepath = self.save(filename, directory=directory, skip_existing=None)
For now I have added a note to use -W ignore:"The signature of":PendingDeprecationWarning
in https://graphviz.readthedocs.io/en/stable/release_process.html (7fab480418ebdf5f4b19b24c985b853542c97439).
Side note: I did not manage to specify the module
for -W
as wanted yet.
I think
pytest
has got more strict about warnings recently.
Hm, or maybe I messed up in e5578d39009469df2b7c6743458970643e228226?
Either way, opened #218 for this.
Looks like it is some conflict between tests/backend/conftest.py and tests/conftest.py
AFAICT this is due to a bug in
pytest 8.1.1
:See
https://github.com/xflr6/graphviz/blob/78daf45dfa779370c542375995d4e59d86d2c1bd/setup.py#L25
Ha .. good catch ๐ Thx to let me know ๐
Either way, opened https://github.com/xflr6/graphviz/issues/218 for this.
Subscribed., Thx ๐
EOT
Looking on https://github.com/xflr6/graphviz/compare/0.20.1...master I think that it would be good to flush all currently committed changes and release new version.
Doable? ๐ค