Run multiple test using PyTest and module names



I'm trying to run two tests withing a script through module names rather than through other means. I have tested writing the following under Run > Configurations > Target > Module name:

script.test_one script.test_two

When I run only one module it works, but I cannot run two. My main goal is to run two specific tests instead of all test within a PyTest script. Can this be done? 

Thank you!

Comment actions Permalink


You can either right-click the directory with your tests and choose Run 'pytest in... and PyCharm will create a run configuration automatically, or create a Compound run configuration which will run a set of needed run configurations.


Please sign in to leave a comment.