Merge pull request #3166 from alanbato/typo_for_parametrize

Switch `for_parameterize` to `for_parametrize`
This commit is contained in:
Bruno Oliveira 2018-01-30 21:41:14 -02:00 committed by GitHub
commit 89a55d85a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -75,7 +75,7 @@ class ParameterSet(namedtuple('ParameterSet', 'values, marks, id')):
return cls(argval, marks=newmarks, id=None) return cls(argval, marks=newmarks, id=None)
@classmethod @classmethod
def _for_parameterize(cls, argnames, argvalues, function, config): def _for_parametrize(cls, argnames, argvalues, function, config):
if not isinstance(argnames, (tuple, list)): if not isinstance(argnames, (tuple, list)):
argnames = [x.strip() for x in argnames.split(",") if x.strip()] argnames = [x.strip() for x in argnames.split(",") if x.strip()]
force_tuple = len(argnames) == 1 force_tuple = len(argnames) == 1

View File

@ -785,7 +785,8 @@ class Metafunc(fixtures.FuncargnamesCompatAttr):
from _pytest.fixtures import scope2index from _pytest.fixtures import scope2index
from _pytest.mark import ParameterSet from _pytest.mark import ParameterSet
from py.io import saferepr from py.io import saferepr
argnames, parameters = ParameterSet._for_parameterize(
argnames, parameters = ParameterSet._for_parametrize(
argnames, argvalues, self.function, self.config) argnames, argvalues, self.function, self.config)
del argvalues del argvalues

1
changelog/3166.trivial Normal file
View File

@ -0,0 +1 @@
Rename ``ParameterSet._for_parameterize()`` to ``_for_parametrize()`` in order to comply with the naming convention.