Git Product home page Git Product logo

Comments (7)

carver avatar carver commented on August 11, 2024 4

The workaround I've been using is ptw mymodule/ tests/ -- --failed-first --exitfirst in order to quickly re-loop on failing tests, but run all the remaining tests. ( or ptw mymodule tests -- --ff -x for the code golfers)

from pytest-watch.

max-sixty avatar max-sixty commented on August 11, 2024 3

Perfect, thanks for clarifying.

For comparison, --looponfail would do:

  • A - pass
  • B - fail
  • C - fail
  • D - fail

Then you try to fix [B], but don't succeed. The next run is:

  • B - fail
  • C - fail
  • D - fail

Then you fix B. The next run is:

  • B - pass
  • C - fail
  • D - fail

...each run runs all the still-failing tests, until they're all fixed

from pytest-watch.

max-sixty avatar max-sixty commented on August 11, 2024

Agree, this would be a great config. This would match the --looponfail behavior

from pytest-watch.

max-sixty avatar max-sixty commented on August 11, 2024

@carver that's a great idea.

To confirm - -x runs one failed test, not all the failed tests; is that correct?

from pytest-watch.

carver avatar carver commented on August 11, 2024

-x halts at the first failed test, which may mean that multiple previously failing tests are run (if they start passing).

from pytest-watch.

max-sixty avatar max-sixty commented on August 11, 2024

Yes, and then the next iteration runs only that single test, as opposed to looping over the failed tests?

from pytest-watch.

carver avatar carver commented on August 11, 2024

Say you have tests A, B, C, D, run in that order. Then you break tests B-D.

The next run is:

  • A - pass
  • B - fail
  • halt

Then you try to fix, but don't succeed. The next run is:

  • B - fail
  • halt

Then you fix B. The next run is:

  • B - pass
  • A - pass
  • C - fail
  • halt

from pytest-watch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.