Compatibility to pytest 5

This commit is contained in:
FinnStutzenstein 2019-07-03 07:46:23 +02:00
parent ec9760216a
commit 78dcc3f902
2 changed files with 6 additions and 6 deletions

View File

@ -16,8 +16,8 @@ matrix:
- pip install --upgrade .[big_mode]
- pip freeze
script:
- python -m mypy openslides/ tests/
- python -W ignore -m pytest --cov --cov-fail-under=70
- mypy openslides/ tests/
- pytest --cov --cov-fail-under=76
- language: python
name: "Server: Tests Python 3.7"
@ -35,8 +35,8 @@ matrix:
- flake8 openslides tests
- isort --check-only --diff --recursive openslides tests
- black --check --diff --target-version py36 openslides tests
- python -m mypy openslides/ tests/
- python -W ignore -m pytest --cov --cov-fail-under=70
- mypy openslides/ tests/
- pytest --cov --cov-fail-under=76
- language: python
name: "Server: Tests Startup Routine Python 3.7"

View File

@ -27,8 +27,8 @@ def pytest_collection_modifyitems(items):
return None
def has_fixture(test, fixture):
funcargnames = getattr(test, "funcargnames", None)
return funcargnames and fixture in funcargnames
fixturenames = getattr(test, "fixturenames", None)
return fixturenames and fixture in fixturenames
def weight_test_case(test):
"""