Closed stanislavlevin closed 7 months ago
Thanks for the report.
Can you try with ./run-tests.py
(https://graphviz.readthedocs.io/en/stable/development.html#tests). On my side the missing warning only happens when running with tox
. I tried downgrading to different older versions (https://tox.wiki/en/legacy/changelog.html) but so far did not manage to find a version/setting where the warning is issued as intended.
I have checked it, the same.
Either the test or the code is incorrect (don't know why supported_number
is hardcoded to 3
for render
).
During the test 3
args are passed to graphviz.render()
In this case supported_number == len(args)
, the warning is not emitted:
The warning pytest.deprecated_call
catches in this test under certain circumstances is some different warning, not the expected one and completely unrelated. The warning message can be check with match
:
https://docs.pytest.org/en/stable/reference/reference.html#pytest-deprecated-call
In the context manager form you may use the keyword argument match to assert that the warning matches a text or regex.
Thank you very much for digging in: it did not occurr to me that the test was indeed incorrect (only visible in tox
).
Thanks, the fix has been verified :+1:
Great, improved the messages (ignore cls
and self
, use singular) and their matching in the tests in e5578d39009469df2b7c6743458970643e228226.
Running tests against current
master
:Tests fail with:
Similar goes for
test_render_unknown_parameter_raises[args1-ValueError-unknown format]
.