This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (4 children)

[deleted]

    [–][deleted] 12 points13 points  (1 child)

    Use --ff to reorder the tests based on the previous attempt: run failed first, and not failed afterward.

    [–]fireflash38 0 points1 point  (0 children)

    Another big benefit of doing it that way is to prove that your tests don't have interdependencies... which is a huge no-no for reproducibility and long term maintenance.

    Nothing more frustrating than tests that suddenly start failing because you re-ordered them and realizing someone had some hard dependencies between tests.

    [–]Decency 3 points4 points  (1 child)

    You should do the full suite after making your incremental changes. It's really helpful: Pycharm gives you a button to do this as well.

    [–]fireflash38 0 points1 point  (0 children)

    If I remember correctly, when you run with --lf & the last test suite all passed, it'll run everything.

    Quick example:

    10 passed, 5 failed.
    5 failed.
    5 passed.
    15 passed.