Skipping unit tests

U

Ulrich Eckhardt

Hi!

We have a few tests for some module here. These tests are under development
and applied to older versions (with less features) of the module, too. That
means that if I have module version 42, tests A and B can not possibly
work. I don't want to have test failures but I also don't want to fork the
test suite, so how do I get the tests to behave like Python's test suite,
which also skips some "expected failures".

Thank you!

Uli
 
G

Gabriel Genellina

En Mon, 11 May 2009 10:33:03 -0300, Ulrich Eckhardt
We have a few tests for some module here. These tests are under
development
and applied to older versions (with less features) of the module, too.
That
means that if I have module version 42, tests A and B can not possibly
work. I don't want to have test failures but I also don't want to fork
the
test suite, so how do I get the tests to behave like Python's test suite,
which also skips some "expected failures".

The simplest way would be to check for some condition (code version,
attribute existence) in the tests themselves, and just skip it when it's
not apropiate.

Another way is to omit the test case from the suite. Things can be a lot
fancier... Look at the Python test suite for some ideas.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top