pytest run only the changed file? : <p>I'm fairly new to Python, trying to learn the toolsets.</p>

<p>I've figured out how to get <code>py.test -f</code> to watch my tests as I code. One thing I haven't been able to figure out is if there's a way to do a smarter watcher, that works like Ruby's Guard library.</p>

<p>Using guard + minitest the behavior I get is if I save a file like <code>my_class.rb</code> then <code>my_class_test.rb</code> is executed, and if I hit <code>enter</code> in the cli it runs all tests.</p>

<p>With pytest so far I haven't been able to figure out a way to only run the test file corresponding to the last touched file, thus avoiding the wait for the entire test suite to run until I've got the current file passing.</p>

<p>How would you pythonistas go about that?</p>

<p>Thanks!</p>
