This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import date | |
import pytest | |
@pytest.mark.skipif(date.today() < date(2017, 10, 1), reason='not yet implemented') | |
def test_foobar(): | |
assert False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class skip_if_exception(object): | |
''' | |
Given an exception type, returns a decorator & context manager | |
that will raise SkipTest if that exception type is raised | |
''' | |
def __init__(self, ExcType): | |
self.ExcType = ExcType | |
def __call__(self, func): | |
return decorator(self.try_func, func) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: VAT identification numbers for Greece use "EL", not "GR". | |
COUNTRY_CODES_EU = %w[ | |
AT BE BG CY CZ DK EE FI FR DE GR HU IE IT | |
LV LT LU MT NL PL PT RO SK SI ES SE GB | |
] |