From 78dcc3f90291ff44a3791dc50eb353a81db42bb0 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Wed, 3 Jul 2019 07:46:23 +0200 Subject: [PATCH] Compatibility to pytest 5 --- .travis.yml | 8 ++++---- tests/conftest.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index e9e502718..01817b460 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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" diff --git a/tests/conftest.py b/tests/conftest.py index 165ad3a8c..cc6e793af 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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): """