Don't run longrun regularily
This commit is contained in:
parent
0981287c62
commit
b39de171c8
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -61,6 +61,12 @@ jobs:
|
|||||||
- name: Tests
|
- name: Tests
|
||||||
run: |
|
run: |
|
||||||
pytest --random-order --cov=freqtrade --cov-config=.coveragerc
|
pytest --random-order --cov=freqtrade --cov-config=.coveragerc
|
||||||
|
if: matrix.python-version != '3.9'
|
||||||
|
|
||||||
|
- name: Tests incl. ccxt compatibility tests
|
||||||
|
run: |
|
||||||
|
pytest --random-order --cov=freqtrade --cov-config=.coveragerc --longrun
|
||||||
|
if: matrix.python-version == '3.9'
|
||||||
|
|
||||||
- name: Coveralls
|
- name: Coveralls
|
||||||
if: (startsWith(matrix.os, 'ubuntu-20') && matrix.python-version == '3.8')
|
if: (startsWith(matrix.os, 'ubuntu-20') && matrix.python-version == '3.8')
|
||||||
|
@ -33,6 +33,19 @@ logging.getLogger('').setLevel(logging.INFO)
|
|||||||
np.seterr(all='raise')
|
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):
|
def log_has(line, logs):
|
||||||
# caplog mocker returns log as a tuple: ('freqtrade.something', logging.WARNING, 'foobar')
|
# caplog mocker returns log as a tuple: ('freqtrade.something', logging.WARNING, 'foobar')
|
||||||
# and we want to match line against foobar in the tuple
|
# and we want to match line against foobar in the tuple
|
||||||
|
@ -50,6 +50,7 @@ def exchange(request, exchange_conf):
|
|||||||
yield exchange, request.param
|
yield exchange, request.param
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.longrun
|
||||||
class TestCCXTExchange():
|
class TestCCXTExchange():
|
||||||
|
|
||||||
def test_load_markets(self, exchange):
|
def test_load_markets(self, exchange):
|
||||||
|
Loading…
Reference in New Issue
Block a user