@@ -29,7 +29,10 @@ def test_b():
29
29
""" )
30
30
31
31
32
- def test_set_false (ctestdir ):
32
+ @pytest .mark .parametrize (
33
+ "false_value" , ["0" , "no" , "n" , "False" , "false" , "f" , "off" ]
34
+ )
35
+ def test_set_false (ctestdir , false_value ):
33
36
"""A pytest.ini is present, automark_dependency is set to false.
34
37
35
38
Since automark_dependency is set to false and test_a is not
@@ -38,9 +41,9 @@ def test_set_false(ctestdir):
38
41
"""
39
42
ctestdir .makefile ('.ini' , pytest = """
40
43
[pytest]
41
- automark_dependency = false
44
+ automark_dependency = %s
42
45
console_output_style = classic
43
- """ )
46
+ """ % false_value )
44
47
ctestdir .makepyfile ("""
45
48
import pytest
46
49
@@ -59,7 +62,10 @@ def test_b():
59
62
""" )
60
63
61
64
62
- def test_set_true (ctestdir ):
65
+ @pytest .mark .parametrize (
66
+ "true_value" , ["1" , "yes" , "y" , "True" , "true" , "t" , "on" ]
67
+ )
68
+ def test_set_true (ctestdir , true_value ):
63
69
"""A pytest.ini is present, automark_dependency is set to false.
64
70
65
71
Since automark_dependency is set to true, the outcome of test_a
@@ -68,9 +74,9 @@ def test_set_true(ctestdir):
68
74
"""
69
75
ctestdir .makefile ('.ini' , pytest = """
70
76
[pytest]
71
- automark_dependency = true
77
+ automark_dependency = %s
72
78
console_output_style = classic
73
- """ )
79
+ """ % true_value )
74
80
ctestdir .makepyfile ("""
75
81
import pytest
76
82
0 commit comments