chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lmig...@apache.org
Subject svn commit: r1847587 - /chemistry/cmislib/branches/py3_compat/src/tests/conftest.py
Date Tue, 27 Nov 2018 19:10:06 GMT
Author: lmignon
Date: Tue Nov 27 19:10:06 2018
New Revision: 1847587

URL: http://svn.apache.org/viewvc?rev=1847587&view=rev
Log:
[PATCH] adapt code for pytest>=4.0

Modified:
    chemistry/cmislib/branches/py3_compat/src/tests/conftest.py

Modified: chemistry/cmislib/branches/py3_compat/src/tests/conftest.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/branches/py3_compat/src/tests/conftest.py?rev=1847587&r1=1847586&r2=1847587&view=diff
==============================================================================
--- chemistry/cmislib/branches/py3_compat/src/tests/conftest.py (original)
+++ chemistry/cmislib/branches/py3_compat/src/tests/conftest.py Tue Nov 27 19:10:06 2018
@@ -87,9 +87,7 @@ CMIS_ENV_IDS = _make_cmis_env_ids()
 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 @@ def cmis_conf(request):
 
 
 @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 @@ def cmis_env(request):
     * 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,



Mime
View raw message