Alexander Hamilton
Alexander Hamilton

Reputation: 103

Attempting to run parallel tests with py.test and -n option is not working

I am attempting to run parallel tests with pytest in mac terminal, but when I use:

py.test -n NUM

I get the following error:

Alexs-MacBook-Pro:sauceTests alex$ py.test -n 3
usage: py.test [options] [file_or_dir] [file_or_dir] [...]
py.test: error: unrecognized arguments: -n
  inifile: None
  rootdir: /Users/alex/PycharmProjects/sauceTests

Thanks!

Upvotes: 2

Views: 458

Answers (1)

wim
wim

Reputation: 363364

You need to install a plugin for that:

pip install pytest-xdist

Upvotes: 5

Related Questions