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

add the ability to skip tests #11

Open
coyotemarin opened this issue Nov 11, 2010 · 3 comments
Open

add the ability to skip tests #11

coyotemarin opened this issue Nov 11, 2010 · 3 comments

Comments

@coyotemarin
Copy link

I'd love it if testify had the ability to report on skipped tests, like unittest: http://docs.python.org/library/unittest.html#skipping-tests-and-expected-failures

The idea behind skipped tests is to tell the user, yeah, those other tests passed, but I couldn't run this test at all because your system doesn't support it.

It's different from expected failures (which indicate that tests are known to be broken and not to worry about it) or disabling tests (which causes the tests to be siliently not run).

I think we could basically make a PEP8 version of the unittest decorators (skip, skip_if, and skip_unless). I'm thinking the reason argument should be optional.

Also, it'd be nice if instead of using a decorator, the test could raise a SkipTest exception (or whatever you want to call it).

@rhettg
Copy link
Contributor

rhettg commented Nov 11, 2010

We do this by excluding 'suites'

Rather than adding a conditional 'skip', under testify you would add the test to a suite that would be selected to not run.

So for example, skipif(version < python2.5) would be done as suite=[python2.5required] and then you'd run with the -x option.

I think having both techniques would be confusing.

@coyotemarin
Copy link
Author

So, the whole point of skipping tests is that the test summary reports how many tests were skipped. Also, it's not up the the person running testify to decide which tests are skipped; the tests themselves decide based on the environment they're running in. Suites are great, but they address a different issue.

@ayust
Copy link
Contributor

ayust commented May 10, 2011

I'd agree with davidmarin that this would be a reasonable feature to add, not sure if it would be a priority though.

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

No branches or pull requests

4 participants