fix regression reported by dstufft: regression when a 1-tuple ("arg",) is used
for specifying parametrization (the values of the parametrization were passed nested in a tuple).
This commit is contained in:
parent
acc5679bc8
commit
d3c9927fee
|
@ -8,6 +8,10 @@ Changes between 2.4.0 and 2.4.1
|
||||||
- fix dotted filename completion when using argcomplete
|
- fix dotted filename completion when using argcomplete
|
||||||
thanks Anthon van der Neuth. (fixes issue361)
|
thanks Anthon van der Neuth. (fixes issue361)
|
||||||
|
|
||||||
|
- fix regression when a 1-tuple ("arg",) is used for specifying
|
||||||
|
parametrization (the values of the parametrization were passed
|
||||||
|
nested in a tuple). Thanks Donald Stufft.
|
||||||
|
|
||||||
- merge doc typo fixes, thanks Andy Dirnberger
|
- merge doc typo fixes, thanks Andy Dirnberger
|
||||||
|
|
||||||
Changes between 2.3.5 and 2.4
|
Changes between 2.3.5 and 2.4
|
||||||
|
|
|
@ -316,6 +316,16 @@ class TestFunction:
|
||||||
reprec = testdir.inline_run()
|
reprec = testdir.inline_run()
|
||||||
reprec.assertoutcome(skipped=1)
|
reprec.assertoutcome(skipped=1)
|
||||||
|
|
||||||
|
def test_single_tuple_unwraps_values(self, testdir):
|
||||||
|
testdir.makepyfile("""
|
||||||
|
import pytest
|
||||||
|
@pytest.mark.parametrize(('arg',), [(1,)])
|
||||||
|
def test_function(arg):
|
||||||
|
assert arg == 1
|
||||||
|
""")
|
||||||
|
reprec = testdir.inline_run()
|
||||||
|
reprec.assertoutcome(passed=1)
|
||||||
|
|
||||||
def test_issue213_parametrize_value_no_equal(self, testdir):
|
def test_issue213_parametrize_value_no_equal(self, testdir):
|
||||||
testdir.makepyfile("""
|
testdir.makepyfile("""
|
||||||
import pytest
|
import pytest
|
||||||
|
|
Loading…
Reference in New Issue