Replies: 1 comment
|
On the command line,
So with For a handler that has to continue after the tests, use the environment directly; from poetry.utils.env import EnvCommandError
try:
self.env.run("pytest", f"--junit-xml={report_path}", call=True)
except EnvCommandError as e:
self.line_error(str(e))
return 1
References:
|
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 checkcommand works fine:However the call the to the
poetry runcommand does not.It fails with:
Looking at the code it seems like the processing in the
callvalidates the arguments as parameters to thepoetry runcommand which of course does not have one named--junit-xml. However that is not an argument for thepoetry runcommand it is an argument for thepytestcommand.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.
All reactions