1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
From: =?utf-8?q?Miro_Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Mon, 18 Jun 2018 17:09:53 +0200
Subject: Only use @pytest.fixture decorator once per fixture
This is now required in pytest >= 3.6
We define our own autoused fixtue not to change the API
See https://github.com/pytest-dev/pytest/issues/3518
Fixes https://github.com/kevin1024/pytest-httpbin/issues/49
---
tests/conftest.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/conftest.py b/tests/conftest.py
index 0d5df6d..710bd5e 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -3,4 +3,6 @@ import pytest
from pytest_httpbin.plugin import httpbin_ca_bundle
-pytest.fixture(autouse=True)(httpbin_ca_bundle)
+@pytest.fixture(autouse=True, scope='function')
+def httpbin_ca_bundle_autoused(httpbin_ca_bundle):
+ pass
|