Skip to content

Commit aba8037

Browse files
committed
Pytest6 supprt
1 parent 2b327dd commit aba8037

File tree

9 files changed

+10
-12
lines changed

9 files changed

+10
-12
lines changed

requirements_dev.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mock==2.0.0
2-
pytest==3.5.0
2+
pytest~=6.0
33
pytest-flake8
4-
pytest-cov==2.5.1
4+
pytest-cov~=2.12
55
falcon==2.0.0; python_version<"3.0"
66
falcon==3.0.0; python_version>="3.0"
77
flask

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ install_requires =
4040
backports.functools-partialmethod; python_version<"3.0"
4141
tests_require =
4242
mock; python_version<"3.0"
43-
pytest
43+
pytest~=6.0
4444
pytest-flake8
4545
pytest-cov
4646
falcon

tests/integration/contrib/django/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import sys
55

66

7-
@pytest.yield_fixture(autouse=True, scope='module')
7+
@pytest.fixture(autouse=True, scope='module')
88
def django_setup():
99
directory = os.path.abspath(os.path.dirname(__file__))
1010
django_project_dir = os.path.join(directory, 'data')

tests/integration/contrib/falcon/test_falcon_middlewares.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def middleware(self, spec):
2626
def app(self, middleware):
2727
return App(middleware=[middleware])
2828

29-
@pytest.yield_fixture
29+
@pytest.fixture
3030
def client(self, app):
3131
return TestClient(app)
3232

tests/integration/contrib/flask/test_flask_decorator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def app(self):
2626
app.config['TESTING'] = True
2727
return app
2828

29-
@pytest.yield_fixture
29+
@pytest.fixture
3030
def client(self, app):
3131
with app.test_client() as client:
3232
with app.app_context():

tests/integration/contrib/flask/test_flask_views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def app(self):
2121
app.config['TESTING'] = True
2222
return app
2323

24-
@pytest.yield_fixture
24+
@pytest.fixture
2525
def client(self, app):
2626
with app.test_client() as client:
2727
with app.app_context():

tests/integration/validation/test_read_only_write_only.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def request_validator(spec):
1919
return RequestValidator(spec)
2020

2121

22-
@pytest.fixture('class')
22+
@pytest.fixture(scope='class')
2323
def spec(factory):
2424
spec_dict = factory.spec_from_file("data/v3.0/read_only_write_only.yaml")
2525
return create_spec(spec_dict)

tests/integration/validation/test_security_override.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def request_validator(spec):
1414
return RequestValidator(spec)
1515

1616

17-
@pytest.fixture('class')
17+
@pytest.fixture(scope='class')
1818
def spec(factory):
1919
spec_dict = factory.spec_from_file("data/v3.0/security_override.yaml")
2020
return create_spec(spec_dict)

tests/unit/unmarshalling/test_unmarshal.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,7 @@ def test_string_format_invalid_value(self, unmarshaller_factory):
302302

303303
with pytest.raises(
304304
FormatterNotFoundError,
305-
message=(
306-
'Formatter not found for custom format'
307-
),
305+
match='Formatter not found for custom format',
308306
):
309307
unmarshaller_factory(schema)(value)
310308

0 commit comments

Comments
 (0)