[PATCH] adapt code for pytest>=4.0
git-svn-id: https://svn.apache.org/repos/asf/chemistry/cmislib/branches/py3_compat@1847587 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/tests/conftest.py b/src/tests/conftest.py
index 44f1a37..6039334 100644
--- a/src/tests/conftest.py
+++ b/src/tests/conftest.py
@@ -87,9 +87,7 @@
MAX_FULL_TEXT_TRIES = 10
-@pytest.fixture(params=CMIS_ENV_PARAMS, ids=CMIS_ENV_IDS)
-def cmis_conf(request):
- """Apply config params as attribute on the class"""
+def _generate_conf(request):
param = request.param
request.cls.max_full_text_tries = MAX_FULL_TEXT_TRIES
for field in param._fields:
@@ -101,6 +99,12 @@
@pytest.fixture(params=CMIS_ENV_PARAMS, ids=CMIS_ENV_IDS)
+def cmis_conf(request):
+ """Apply config params as attribute on the class"""
+ _generate_conf(request)
+
+
+@pytest.fixture(params=CMIS_ENV_PARAMS, ids=CMIS_ENV_IDS)
def cmis_env(request):
"""Initialize a cmis environement with
* CmisClient
@@ -110,7 +114,7 @@
* test folder
All these attributes are reset after each test method
"""
- cmis_conf(request)
+ _generate_conf(request)
param = request.param
request.cls._cmisClient = CmisClient(
param.url, param.user, param.pwd, binding=param.binding,