waitingkuo
waitingkuo

Reputation: 93934

How can I auto run py.test once a relative command has been change?

Via autonose or nosy, it will automatically run the nosetests once the some tests file or the relative files have been changes. I would like to ask that whether py.test provides the similar function for is there any other tools can automatically excite py.test.

Upvotes: 6

Views: 2121

Answers (1)

hpk42
hpk42

Reputation: 23621

You can install the pytest-xdist plugin and issue:

$ py.test --looponfail <filename>

You can also set the "looponfailroots" ini-file option to direct the plugin where to look for changes.

Upvotes: 6

Related Questions