Day 1015
unittest skip test based on condition
From unittest documentation 1
class MyTestCase(unittest.TestCase):
@unittest.skipIf(mylib.__version__ < (1, 3), "not supported in this library version")
def test_format(self):
# Tests that work for only a certain version of the library.
pass
Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus