Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modification watcher #3

Open
Glueon opened this issue Jun 9, 2015 · 6 comments
Open

Modification watcher #3

Glueon opened this issue Jun 9, 2015 · 6 comments

Comments

@Glueon
Copy link

Glueon commented Jun 9, 2015

Hello,
Very cool plugin, but is it possible to combine it with any plugin or add a function of automatic test rerun on file modifications?

I used https://github.com/joeyespo/pytest-watch but it does not accept --inc parameter.

@blueyed
Copy link

blueyed commented Jun 9, 2015

See also https://github.com/tarpas/testmon / tmon.py.

You can use watchdog or pyinotify to wrap it yourself.

@tarpas
Copy link

tarpas commented Jun 9, 2015

See issues and PR's of https://github.com/joeyespo/pytest-watch ... The
passing of argument is beeing seriously worked on, so hopefully it lands
soon.. I'll then hopefully just adopt that for testmon and remove tmon.py.

On Tue, Jun 9, 2015 at 8:00 AM, Daniel Hahler notifications@github.com
wrote:

See also https://github.com/tarpas/testmon / tmon.py.

You can use watchdog or pyinotify https://github.com/seb-m/pyinotify to
wrap it yourself.


Reply to this email directly or view it on GitHub
#3 (comment)
.

@Glueon
Copy link
Author

Glueon commented Jun 9, 2015

Thanks for you suggestions, but I realized I can pass options via pytest.ini file. And it works.

The only thing bothering me is it sometimes reruns tests 2-3 times when the file the gets modified. But this is a pytest-incremental related question.

@schettino72
Copy link
Member

@Glueon pytest-incremental used to have a watcher but it was lost in the last re-write. So this is something I definitely want to add. Please note that although blueyed is shown as a collaborator, simply recommending another plugin or telling you to wrap watchdog yourself is not my official position...

There are a few problems in using this plugin with pytest-watch so I am not sure this is the way to go. I will take a look on it...

@RonnyPfannschmidt
Copy link
Member

there are future plans to add such a watch functionality in pytest, but it will happen sometime after pytest-cache is integrated in pytest core and pytest is son github

@Glueon
Copy link
Author

Glueon commented Jun 10, 2015

I definetly wanted to say that this is not a pytest-incremental question. The xdist plugin with loop-fail also has the problem rerunning tests several times on file modification. I have posted an issue already. Maybe it has something to do with the fact I am running tests in a docker container on a code which is in a volume mounted to my host machine.

At the moment pretty ok with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants