@@ -43,12 +43,12 @@ def pytest_addoption(parser):
43
43
help = "Log the timing data for each test case execution." ,
44
44
)
45
45
consume_group .addoption (
46
- "--strict-exception-matching" ,
46
+ "--disable- strict-exception-matching" ,
47
47
action = "store" ,
48
- dest = "strict_exception_matching " ,
48
+ dest = "disable_strict_exception_matching " ,
49
49
default = "" ,
50
50
help = (
51
- "Comma-separated list of the names of clients which should use strict "
51
+ "Comma-separated list of the names of clients which should NOT use strict "
52
52
"exception matching."
53
53
),
54
54
)
@@ -220,19 +220,19 @@ def client_exception_mapper(
220
220
221
221
222
222
@pytest .fixture (scope = "session" )
223
- def strict_exception_matching (request : pytest .FixtureRequest ) -> List [str ]:
224
- """Return the list of clients that should use strict exception matching."""
225
- config_string = request .config .getoption ("strict_exception_matching " )
223
+ def disable_strict_exception_matching (request : pytest .FixtureRequest ) -> List [str ]:
224
+ """Return the list of clients that should NOT use strict exception matching."""
225
+ config_string = request .config .getoption ("disable_strict_exception_matching " )
226
226
return config_string .split ("," ) if config_string else []
227
227
228
228
229
229
@pytest .fixture (scope = "function" )
230
230
def client_strict_exception_matching (
231
231
client_type : ClientType ,
232
- strict_exception_matching : List [str ],
232
+ disable_strict_exception_matching : List [str ],
233
233
) -> bool :
234
234
"""Return True if the client type should use strict exception matching."""
235
- return any (client in client_type .name for client in strict_exception_matching )
235
+ return not any (client in client_type .name for client in disable_strict_exception_matching )
236
236
237
237
238
238
@pytest .fixture (scope = "function" )
0 commit comments