Don't run longrun regularily

This commit is contained in:
Matthias
2020-12-23 15:46:08 +01:00
parent 0981287c62
commit b39de171c8
3 changed files with 20 additions and 0 deletions

View File

@@ -33,6 +33,19 @@ logging.getLogger('').setLevel(logging.INFO)
np.seterr(all='raise')
def pytest_addoption(parser):
parser.addoption('--longrun', action='store_true', dest="longrun",
default=False, help="Enable long-run tests (ccxt compat)")
def pytest_configure(config):
config.addinivalue_line(
"markers", "longrun: mark test that is running slowly and should not be run regularily"
)
if not config.option.longrun:
setattr(config.option, 'markexpr', 'not longrun')
def log_has(line, logs):
# caplog mocker returns log as a tuple: ('freqtrade.something', logging.WARNING, 'foobar')
# and we want to match line against foobar in the tuple

View File

@@ -50,6 +50,7 @@ def exchange(request, exchange_conf):
yield exchange, request.param
@pytest.mark.longrun
class TestCCXTExchange():
def test_load_markets(self, exchange):