You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However the call the to the poetry run command does not.
It fails with:
Running unit tests...
pytest --junit-xml="/path_to_location_for_test_reports/all_tests.xml"
The option "--junit-xml" does not exist
Looking at the code it seems like the processing in the call validates the arguments as parameters to the poetry run command which of course does not have one named --junit-xml. However that is not an argument for the poetry run command it is an argument for the pytest command.
I can run this on the command line:
poetry run pytest --junit-xml="/path_to_location_for_test_reports/all_tests.xml"
==================================== test session starts ========================================
platform linux -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0
rootdir: /project_root
configfile: pyproject.toml
plugins: anyio-4.9.0
collected 0 items
----------------- generated xml file: /path_to_location_for_test_reports/all_tests.xml ------------------
===================================== no tests ran in 0.01s ======================================
Yes, I have no tests in the sample project. No, having a test doesn't change anything - other than they run when I type the command on the command line.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am creating a plugin for poetry meant to help implement our workflow. In my custom command handler I need to call several poetry commands.
The call to the
poetry check
command works fine:However the call the to the
poetry run
command does not.It fails with:
Looking at the code it seems like the processing in the
call
validates the arguments as parameters to thepoetry run
command which of course does not have one named--junit-xml
. However that is not an argument for thepoetry run
command it is an argument for thepytest
command.I can run this on the command line:
Yes, I have no tests in the sample project. No, having a test doesn't change anything - other than they run when I type the command on the command line.
Beta Was this translation helpful? Give feedback.
All reactions