Skip to content

Commit 307d1f4

Browse files
fix: use threading instead of subprocess for Windows compatibility (#639)
1 parent df8558b commit 307d1f4

File tree

8 files changed

+70
-370
lines changed

8 files changed

+70
-370
lines changed

tests/compatibility_suite/test_v1_provider.py

Lines changed: 0 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -44,47 +44,27 @@
4444
## Scenario
4545
################################################################################
4646

47-
48-
@pytest.mark.skipif(
49-
sys.platform.startswith("win"),
50-
reason="See pact-foundation/pact-python#639",
51-
)
5247
@scenario(
5348
"definition/features/V1/http_provider.feature",
5449
"Verifying a simple HTTP request",
5550
)
5651
def test_verifying_a_simple_http_request() -> None:
5752
"""Verifying a simple HTTP request."""
5853

59-
60-
@pytest.mark.skipif(
61-
sys.platform.startswith("win"),
62-
reason="See pact-foundation/pact-python#639",
63-
)
6454
@scenario(
6555
"definition/features/V1/http_provider.feature",
6656
"Verifying multiple Pact files",
6757
)
6858
def test_verifying_multiple_pact_files() -> None:
6959
"""Verifying multiple Pact files."""
7060

71-
72-
@pytest.mark.skipif(
73-
sys.platform.startswith("win"),
74-
reason="See pact-foundation/pact-python#639",
75-
)
7661
@scenario(
7762
"definition/features/V1/http_provider.feature",
7863
"Incorrect request is made to provider",
7964
)
8065
def test_incorrect_request_is_made_to_provider() -> None:
8166
"""Incorrect request is made to provider."""
8267

83-
84-
@pytest.mark.skipif(
85-
sys.platform.startswith("win"),
86-
reason="See pact-foundation/pact-python#639",
87-
)
8868
@pytest.mark.container
8969
@scenario(
9070
"definition/features/V1/http_provider.feature",
@@ -93,11 +73,6 @@ def test_incorrect_request_is_made_to_provider() -> None:
9373
def test_verifying_a_simple_http_request_via_a_pact_broker() -> None:
9474
"""Verifying a simple HTTP request via a Pact broker."""
9575

96-
97-
@pytest.mark.skipif(
98-
sys.platform.startswith("win"),
99-
reason="See pact-foundation/pact-python#639",
100-
)
10176
@pytest.mark.container
10277
@scenario(
10378
"definition/features/V1/http_provider.feature",
@@ -106,11 +81,6 @@ def test_verifying_a_simple_http_request_via_a_pact_broker() -> None:
10681
def test_verifying_a_simple_http_request_via_a_pact_broker_with_publishing() -> None:
10782
"""Verifying a simple HTTP request via a Pact broker with publishing."""
10883

109-
110-
@pytest.mark.skipif(
111-
sys.platform.startswith("win"),
112-
reason="See pact-foundation/pact-python#639",
113-
)
11484
@pytest.mark.container
11585
@scenario(
11686
"definition/features/V1/http_provider.feature",
@@ -120,10 +90,6 @@ def test_verifying_multiple_pact_files_via_a_pact_broker() -> None:
12090
"""Verifying multiple Pact files via a Pact broker."""
12191

12292

123-
@pytest.mark.skipif(
124-
sys.platform.startswith("win"),
125-
reason="See pact-foundation/pact-python#639",
126-
)
12793
@pytest.mark.container
12894
@scenario(
12995
"definition/features/V1/http_provider.feature",
@@ -133,10 +99,6 @@ def test_incorrect_request_is_made_to_provider_via_a_pact_broker() -> None:
13399
"""Incorrect request is made to provider via a Pact broker."""
134100

135101

136-
@pytest.mark.skipif(
137-
sys.platform.startswith("win"),
138-
reason="See pact-foundation/pact-python#639",
139-
)
140102
@scenario(
141103
"definition/features/V1/http_provider.feature",
142104
"Verifying an interaction with a defined provider state",
@@ -145,10 +107,6 @@ def test_verifying_an_interaction_with_a_defined_provider_state() -> None:
145107
"""Verifying an interaction with a defined provider state."""
146108

147109

148-
@pytest.mark.skipif(
149-
sys.platform.startswith("win"),
150-
reason="See pact-foundation/pact-python#639",
151-
)
152110
@scenario(
153111
"definition/features/V1/http_provider.feature",
154112
"Verifying an interaction with no defined provider state",
@@ -157,10 +115,6 @@ def test_verifying_an_interaction_with_no_defined_provider_state() -> None:
157115
"""Verifying an interaction with no defined provider state."""
158116

159117

160-
@pytest.mark.skipif(
161-
sys.platform.startswith("win"),
162-
reason="See pact-foundation/pact-python#639",
163-
)
164118
@scenario(
165119
"definition/features/V1/http_provider.feature",
166120
"Verifying an interaction where the provider state callback fails",
@@ -169,10 +123,6 @@ def test_verifying_an_interaction_where_the_provider_state_callback_fails() -> N
169123
"""Verifying an interaction where the provider state callback fails."""
170124

171125

172-
@pytest.mark.skipif(
173-
sys.platform.startswith("win"),
174-
reason="See pact-foundation/pact-python#639",
175-
)
176126
@scenario(
177127
"definition/features/V1/http_provider.feature",
178128
"Verifying an interaction where a provider state callback is not configured",
@@ -181,10 +131,6 @@ def test_verifying_an_interaction_where_no_provider_state_callback_configured()
181131
"""Verifying an interaction where a provider state callback is not configured."""
182132

183133

184-
@pytest.mark.skipif(
185-
sys.platform.startswith("win"),
186-
reason="See pact-foundation/pact-python#639",
187-
)
188134
@scenario(
189135
"definition/features/V1/http_provider.feature",
190136
"Verifying a HTTP request with a request filter configured",
@@ -193,10 +139,6 @@ def test_verifying_a_http_request_with_a_request_filter_configured() -> None:
193139
"""Verifying a HTTP request with a request filter configured."""
194140

195141

196-
@pytest.mark.skipif(
197-
sys.platform.startswith("win"),
198-
reason="See pact-foundation/pact-python#639",
199-
)
200142
@scenario(
201143
"definition/features/V1/http_provider.feature",
202144
"Verifies the response status code",
@@ -205,10 +147,6 @@ def test_verifies_the_response_status_code() -> None:
205147
"""Verifies the response status code."""
206148

207149

208-
@pytest.mark.skipif(
209-
sys.platform.startswith("win"),
210-
reason="See pact-foundation/pact-python#639",
211-
)
212150
@scenario(
213151
"definition/features/V1/http_provider.feature",
214152
"Verifies the response headers",
@@ -217,10 +155,6 @@ def test_verifies_the_response_headers() -> None:
217155
"""Verifies the response headers."""
218156

219157

220-
@pytest.mark.skipif(
221-
sys.platform.startswith("win"),
222-
reason="See pact-foundation/pact-python#639",
223-
)
224158
@scenario(
225159
"definition/features/V1/http_provider.feature",
226160
"Response with plain text body (positive case)",
@@ -229,10 +163,6 @@ def test_response_with_plain_text_body_positive_case() -> None:
229163
"""Response with plain text body (positive case)."""
230164

231165

232-
@pytest.mark.skipif(
233-
sys.platform.startswith("win"),
234-
reason="See pact-foundation/pact-python#639",
235-
)
236166
@scenario(
237167
"definition/features/V1/http_provider.feature",
238168
"Response with plain text body (negative case)",
@@ -241,10 +171,6 @@ def test_response_with_plain_text_body_negative_case() -> None:
241171
"""Response with plain text body (negative case)."""
242172

243173

244-
@pytest.mark.skipif(
245-
sys.platform.startswith("win"),
246-
reason="See pact-foundation/pact-python#639",
247-
)
248174
@scenario(
249175
"definition/features/V1/http_provider.feature",
250176
"Response with JSON body (positive case)",
@@ -253,10 +179,6 @@ def test_response_with_json_body_positive_case() -> None:
253179
"""Response with JSON body (positive case)."""
254180

255181

256-
@pytest.mark.skipif(
257-
sys.platform.startswith("win"),
258-
reason="See pact-foundation/pact-python#639",
259-
)
260182
@scenario(
261183
"definition/features/V1/http_provider.feature",
262184
"Response with JSON body (negative case)",
@@ -265,10 +187,6 @@ def test_response_with_json_body_negative_case() -> None:
265187
"""Response with JSON body (negative case)."""
266188

267189

268-
@pytest.mark.skipif(
269-
sys.platform.startswith("win"),
270-
reason="See pact-foundation/pact-python#639",
271-
)
272190
@scenario(
273191
"definition/features/V1/http_provider.feature",
274192
"Response with XML body (positive case)",
@@ -277,10 +195,6 @@ def test_response_with_xml_body_positive_case() -> None:
277195
"""Response with XML body (positive case)."""
278196

279197

280-
@pytest.mark.skipif(
281-
sys.platform.startswith("win"),
282-
reason="See pact-foundation/pact-python#639",
283-
)
284198
@scenario(
285199
"definition/features/V1/http_provider.feature",
286200
"Response with XML body (negative case)",
@@ -289,10 +203,6 @@ def test_response_with_xml_body_negative_case() -> None:
289203
"""Response with XML body (negative case)."""
290204

291205

292-
@pytest.mark.skipif(
293-
sys.platform.startswith("win"),
294-
reason="See pact-foundation/pact-python#639",
295-
)
296206
@scenario(
297207
"definition/features/V1/http_provider.feature",
298208
"Response with binary body (positive case)",
@@ -301,10 +211,6 @@ def test_response_with_binary_body_positive_case() -> None:
301211
"""Response with binary body (positive case)."""
302212

303213

304-
@pytest.mark.skipif(
305-
sys.platform.startswith("win"),
306-
reason="See pact-foundation/pact-python#639",
307-
)
308214
@scenario(
309215
"definition/features/V1/http_provider.feature",
310216
"Response with binary body (negative case)",
@@ -313,10 +219,6 @@ def test_response_with_binary_body_negative_case() -> None:
313219
"""Response with binary body (negative case)."""
314220

315221

316-
@pytest.mark.skipif(
317-
sys.platform.startswith("win"),
318-
reason="See pact-foundation/pact-python#639",
319-
)
320222
@scenario(
321223
"definition/features/V1/http_provider.feature",
322224
"Response with form post body (positive case)",
@@ -325,10 +227,6 @@ def test_response_with_form_post_body_positive_case() -> None:
325227
"""Response with form post body (positive case)."""
326228

327229

328-
@pytest.mark.skipif(
329-
sys.platform.startswith("win"),
330-
reason="See pact-foundation/pact-python#639",
331-
)
332230
@scenario(
333231
"definition/features/V1/http_provider.feature",
334232
"Response with form post body (negative case)",
@@ -337,10 +235,6 @@ def test_response_with_form_post_body_negative_case() -> None:
337235
"""Response with form post body (negative case)."""
338236

339237

340-
@pytest.mark.skipif(
341-
sys.platform.startswith("win"),
342-
reason="See pact-foundation/pact-python#639",
343-
)
344238
@scenario(
345239
"definition/features/V1/http_provider.feature",
346240
"Response with multipart body (positive case)",
@@ -349,10 +243,6 @@ def test_response_with_multipart_body_positive_case() -> None:
349243
"""Response with multipart body (positive case)."""
350244

351245

352-
@pytest.mark.skipif(
353-
sys.platform.startswith("win"),
354-
reason="See pact-foundation/pact-python#639",
355-
)
356246
@scenario(
357247
"definition/features/V1/http_provider.feature",
358248
"Response with multipart body (negative case)",

tests/compatibility_suite/test_v2_provider.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@
2929
## Scenario
3030
################################################################################
3131

32-
33-
@pytest.mark.skipif(
34-
sys.platform.startswith("win"),
35-
reason="See pact-foundation/pact-python#639",
36-
)
3732
@scenario(
3833
"definition/features/V2/http_provider.feature",
3934
"Supports matching rules for the response headers (positive case)",
@@ -43,11 +38,6 @@ def test_supports_matching_rules_for_the_response_headers_positive_case() -> Non
4338
Supports matching rules for the response headers (positive case).
4439
"""
4540

46-
47-
@pytest.mark.skipif(
48-
sys.platform.startswith("win"),
49-
reason="See pact-foundation/pact-python#639",
50-
)
5141
@scenario(
5242
"definition/features/V2/http_provider.feature",
5343
"Supports matching rules for the response headers (negative case)",
@@ -57,11 +47,6 @@ def test_supports_matching_rules_for_the_response_headers_negative_case() -> Non
5747
Supports matching rules for the response headers (negative case).
5848
"""
5949

60-
61-
@pytest.mark.skipif(
62-
sys.platform.startswith("win"),
63-
reason="See pact-foundation/pact-python#639",
64-
)
6550
@scenario(
6651
"definition/features/V2/http_provider.feature",
6752
"Verifies the response body (positive case)",
@@ -71,11 +56,6 @@ def test_verifies_the_response_body_positive_case() -> None:
7156
Verifies the response body (positive case).
7257
"""
7358

74-
75-
@pytest.mark.skipif(
76-
sys.platform.startswith("win"),
77-
reason="See pact-foundation/pact-python#639",
78-
)
7959
@scenario(
8060
"definition/features/V2/http_provider.feature",
8161
"Verifies the response body (negative case)",

0 commit comments

Comments
 (0)