At the moment I am using py.test to run the test and define skipped test as the following:
@pytest.mark.skipif(True, reason="blockchain.info support currently disabled")
class BlockChainBTCTestCase(CoinTestCase, unittest.TestCase):
...
@pytest.mark.skipif(is_slow_test_hostile(), reason="Running send + receive loop may take > 20 minutes")
def test_send_receive_external(self):
""" Test sending and receiving external transaction within the backend wallet.
Does green provide corresponding facilities if I want to migrate my tests to green?
Yes! Green supports
unittest
's built-inunittest.skipIf(condition, reason)
function, as well as the rest of the skip functions and exceptions likeskip()
,skipUnless()
, andSkipTest
.Note that this requires Python 2.7 or later.