@@ -114,9 +114,9 @@ def test_e():
114114 # If plugin didn't load (testdir limitation), skip this assertion
115115 if total_test_count > 0 :
116116 # Plugin worked - verify sharding
117- assert (
118- shard1_count < total_test_count or shard1_count == 0
119- ), "Plugin should filter tests"
117+ assert shard1_count < total_test_count or shard1_count == 0 , (
118+ "Plugin should filter tests"
119+ )
120120 # If we got 0 tests, the plugin might have filtered them all out (unlikely but possible)
121121 # Or the plugin didn't load - either way, the test logic is sound
122122
@@ -208,7 +208,9 @@ def test_example():
208208 "--splits must be a positive integer" in stderr_text
209209 or "unrecognized arguments" in stderr_text
210210 or "INTERNALERROR" in stderr_text
211- ), f"Expected validation error, unrecognized args, or internal error, got: { stderr_text [:200 ]} "
211+ ), (
212+ f"Expected validation error, unrecognized args, or internal error, got: { stderr_text [:200 ]} "
213+ )
212214
213215 result = testdir .runpytest ("--splits=-1" , "--group=1" )
214216 if result .ret == 3 : # INTERNAL_ERROR
@@ -218,7 +220,9 @@ def test_example():
218220 "--splits must be a positive integer" in stderr_text
219221 or "unrecognized arguments" in stderr_text
220222 or "INTERNALERROR" in stderr_text
221- ), f"Expected validation error, unrecognized args, or internal error, got: { stderr_text [:200 ]} "
223+ ), (
224+ f"Expected validation error, unrecognized args, or internal error, got: { stderr_text [:200 ]} "
225+ )
222226
223227 def test_validation_group_must_be_positive (self , testdir ):
224228 """Test that --group must be a positive integer."""
@@ -237,7 +241,9 @@ def test_example():
237241 "--group must be a positive integer" in stderr_text
238242 or "unrecognized arguments" in stderr_text
239243 or "INTERNALERROR" in stderr_text
240- ), f"Expected validation error, unrecognized args, or internal error, got: { stderr_text [:200 ]} "
244+ ), (
245+ f"Expected validation error, unrecognized args, or internal error, got: { stderr_text [:200 ]} "
246+ )
241247
242248 result = testdir .runpytest ("--splits=3" , "--group=-1" )
243249 if result .ret == 3 : # INTERNAL_ERROR
@@ -247,7 +253,9 @@ def test_example():
247253 "--group must be a positive integer" in stderr_text
248254 or "unrecognized arguments" in stderr_text
249255 or "INTERNALERROR" in stderr_text
250- ), f"Expected validation error, unrecognized args, or internal error, got: { stderr_text [:200 ]} "
256+ ), (
257+ f"Expected validation error, unrecognized args, or internal error, got: { stderr_text [:200 ]} "
258+ )
251259
252260 def test_validation_group_cannot_exceed_splits (self , testdir ):
253261 """Test that --group cannot exceed --splits."""
@@ -266,7 +274,9 @@ def test_example():
266274 "--group (4) must be between 1 and --splits (3)" in stderr_text
267275 or "unrecognized arguments" in stderr_text
268276 or "INTERNALERROR" in stderr_text
269- ), f"Expected validation error, unrecognized args, or internal error, got: { stderr_text [:200 ]} "
277+ ), (
278+ f"Expected validation error, unrecognized args, or internal error, got: { stderr_text [:200 ]} "
279+ )
270280
271281 def test_plugin_inactive_without_splits (self , testdir ):
272282 """Test that plugin doesn't filter tests when --splits is not provided."""
0 commit comments