@@ -23,35 +23,37 @@ def __init__(self, expected, actual, msg=None, preformated=False, real_exception
2323
2424
2525@pytest .mark .filterwarnings ("default" )
26- def test_logs_a_warning_if_unable_to_apply_patch (testdir ):
26+ def test_logs_a_warning_if_unable_to_apply_patch (testdir , plugin_args ):
2727 testdir .makepyfile (
2828 test_file = """
2929 def test_case(snapshot):
3030 assert snapshot == [1, 2]
3131 """
3232 )
33- testdir .runpytest ("-v" , "--snapshot-update" )
33+ testdir .runpytest ("-v" , "--snapshot-update" , * plugin_args )
3434 testdir .makepyfile (
3535 test_file = """
3636 def test_case(snapshot):
3737 assert snapshot == [1, 2, 3]
3838 """
3939 )
4040
41- result = testdir .runpytest ("-v" , "--snapshot-patch-pycharm-diff" )
41+ result = testdir .runpytest ("-v" , "--snapshot-patch-pycharm-diff" , * plugin_args )
4242 result .assert_outcomes (failed = 1 , passed = 0 , warnings = 1 )
4343
4444
4545@pytest .mark .filterwarnings ("default" )
46- def test_patches_pycharm_diff_tools_when_flag_set (testdir , mock_teamcity_diff_tools ):
46+ def test_patches_pycharm_diff_tools_when_flag_set (
47+ testdir , mock_teamcity_diff_tools , plugin_args
48+ ):
4749 # Generate initial snapshot
4850 testdir .makepyfile (
4951 test_file = """
5052 def test_case(snapshot):
5153 assert snapshot == [1, 2]
5254 """
5355 )
54- testdir .runpytest ("-v" , "--snapshot-update" )
56+ testdir .runpytest ("-v" , "--snapshot-update" , * plugin_args )
5557
5658 # Generate diff and mimic EqualsAssertionError being thrown
5759 testdir .makepyfile (
@@ -70,7 +72,7 @@ def test_case(snapshot):
7072 """
7173 )
7274
73- result = testdir .runpytest ("-v" , "--snapshot-patch-pycharm-diff" )
75+ result = testdir .runpytest ("-v" , "--snapshot-patch-pycharm-diff" , * plugin_args )
7476 # No warnings because patch should have been successful
7577 result .assert_outcomes (failed = 1 , passed = 0 , warnings = 0 )
7678
@@ -85,7 +87,7 @@ def test_case(snapshot):
8587
8688@pytest .mark .filterwarnings ("default" )
8789def test_patches_pycharm_diff_tools_when_flag_set_and_snapshot_on_right (
88- testdir , mock_teamcity_diff_tools
90+ testdir , mock_teamcity_diff_tools , plugin_args
8991):
9092 # Generate initial snapshot
9193 testdir .makepyfile (
@@ -94,7 +96,7 @@ def test_case(snapshot):
9496 assert [1, 2] == snapshot
9597 """
9698 )
97- testdir .runpytest ("-v" , "--snapshot-update" )
99+ testdir .runpytest ("-v" , "--snapshot-update" , * plugin_args )
98100
99101 # Generate diff and mimic EqualsAssertionError being thrown
100102 testdir .makepyfile (
@@ -113,7 +115,7 @@ def test_case(snapshot):
113115 """
114116 )
115117
116- result = testdir .runpytest ("-v" , "--snapshot-patch-pycharm-diff" )
118+ result = testdir .runpytest ("-v" , "--snapshot-patch-pycharm-diff" , * plugin_args )
117119 # No warnings because patch should have been successful
118120 result .assert_outcomes (failed = 1 , passed = 0 , warnings = 0 )
119121
@@ -128,7 +130,7 @@ def test_case(snapshot):
128130
129131@pytest .mark .filterwarnings ("default" )
130132def test_it_does_not_patch_pycharm_diff_tools_by_default (
131- testdir , mock_teamcity_diff_tools
133+ testdir , mock_teamcity_diff_tools , plugin_args
132134):
133135 # Generate initial snapshot
134136 testdir .makepyfile (
@@ -137,7 +139,7 @@ def test_case(snapshot):
137139 assert snapshot == [1, 2]
138140 """
139141 )
140- testdir .runpytest ("-v" , "--snapshot-update" )
142+ testdir .runpytest ("-v" , "--snapshot-update" , * plugin_args )
141143
142144 # Generate diff and mimic EqualsAssertionError being thrown
143145 testdir .makepyfile (
@@ -156,7 +158,7 @@ def test_case(snapshot):
156158 """
157159 )
158160
159- result = testdir .runpytest ("-v" )
161+ result = testdir .runpytest ("-v" , * plugin_args )
160162 # No warnings because patch should have been successful
161163 result .assert_outcomes (failed = 1 , passed = 0 , warnings = 0 )
162164
@@ -170,7 +172,9 @@ def test_case(snapshot):
170172
171173
172174@pytest .mark .filterwarnings ("default" )
173- def test_it_has_no_impact_on_non_syrupy_assertions (testdir , mock_teamcity_diff_tools ):
175+ def test_it_has_no_impact_on_non_syrupy_assertions (
176+ testdir , mock_teamcity_diff_tools , plugin_args
177+ ):
174178 # Generate diff and mimic EqualsAssertionError being thrown
175179 testdir .makepyfile (
176180 test_file = """
@@ -188,7 +192,7 @@ def test_case():
188192 """
189193 )
190194
191- result = testdir .runpytest ("-v" )
195+ result = testdir .runpytest ("-v" , * plugin_args )
192196 # No warnings because patch should have been successful
193197 result .assert_outcomes (failed = 1 , passed = 0 , warnings = 0 )
194198
@@ -202,7 +206,7 @@ def test_case():
202206
203207@pytest .mark .filterwarnings ("default" )
204208def test_has_no_impact_on_real_exceptions_that_are_not_assertion_errors (
205- testdir , mock_teamcity_diff_tools
209+ testdir , mock_teamcity_diff_tools , plugin_args
206210):
207211 # Generate diff and mimic EqualsAssertionError being thrown
208212 testdir .makepyfile (
@@ -225,7 +229,7 @@ def test_case():
225229 """
226230 )
227231
228- result = testdir .runpytest ("-v" )
232+ result = testdir .runpytest ("-v" , * plugin_args )
229233 # No warnings because patch should have been successful
230234 result .assert_outcomes (failed = 1 , passed = 0 , warnings = 0 )
231235
0 commit comments