File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,13 @@ def actual_test(*args, **kwargs):
3939 f"this test: { excluding } ."
4040 )(actual_test )
4141
42- return pytest .mark .parametrize (
42+ test = pytest .mark .parametrize (
4343 "test_context" ,
4444 test_context_names ,
4545 )(actual_test )
4646
47+ return pytest .mark .context_dependent (test )
48+
4749
4850def for_all_test_contexts (* args , ** kwargs ):
4951 """Parametrize the decorated test over all test contexts with the argument
@@ -80,7 +82,7 @@ def requires_context(context_name: str):
8082 ctx_names = (type (ctx ).__name__ for ctx in get_test_contexts ())
8183
8284 if {context_name } & set (ctx_names ): # proceed as normal
83- return lambda test_function : test_function
85+ return pytest . mark . context_dependent
8486
8587 return pytest .mark .skip (f"{ context_name } is unavailable on this platform." )
8688
You can’t perform that action at this time.
0 commit comments