heynemann / pyvows

Python implementation of Vows.js

Home Page:http://pyvows.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stop on parent context’s error / first fail

ssteinbach opened this issue · comments

With the older unittest library, there's a nice --failfirst (or something) option which stops running tests after the first failure. I find this is a pretty useful flag when you're trying to fix a particular problem.

Is there a way to do this in pyvows?

Related:
Is there a way to not run child tests if a parent context is already an exception? I get stuff where all the children say things like attribute error: index error has no attribute FOO.

I also think a “skip descendant tests on failure” option would be useful.

An interesting alternative to stop on first fail could be `invoke pdb on first fail'. Would something like that be possible?

I think #54 solves this better. Instead of stopping at the first error you can focus on one error at a time.

What do you guys think?

I'm commenting on the other thread - if I can have a commandline option to run a single vow, then personally I'm happy without the stop on first fail argument!

Stopping unrelated contexts (especially from different suites) would be really weird and not straightforward, plus I'm not sure if that was actually part of the original problem. Seems like this issue is primarily focused on the ability to only execute vows/contexts that are failing by limiting execution to them on consecutive runs and skipping dependencies to avoid obvious subsequent failures in the initial run.

At this point pyvows has:

  1. Command line option to run a single context or vow (#112)
  2. Skipping descendant tests on failure

Points 1 and 2 address the original intent of this issue I think, so I'm closing this for now. We can address the idea of entering debug on failure as a separate issue if that is a desirable feature.