DEV Community

Discussion on: Build and Test a Command Line Interface with Poetry, Python's argparse, and pytest

Collapse
 
flxvctr profile image
Felix Victor Münch

Looks like a neat solution. However, maybe I am overlooking something in my implementation in my code, but it does not seem to go well with running pytest itself with CL arguments (e.g. the super-handy '--lf'). Seems to try to parse those then as well and throws an exception.

What speaks again simply using pytest-console-scripts (pypi.org/project/pytest-console-sc...) instead? Worked out of the box for my case.

Collapse
 
bowmanjd profile image
Jonathan Bowman

So sorry to miss your comment so long ago! Thank you so much for the pytest-console-scripts recommendation. I may incorporate that back into the article, if that is OK with you.

Collapse
 
flxvctr profile image
Felix Victor Münch

Sure! No need to even ask if it will help people :)