@@ -1010,16 +1010,18 @@ def run(data):
1010
1010
1011
1011
# self.test_runner can include the execute_example method, or setup/teardown
1012
1012
# _example, so it's important to get the PRNG and build context in place first.
1013
- with local_settings (self .settings ):
1014
- with deterministic_PRNG ():
1015
- with BuildContext (data , is_final = is_final ) as context :
1016
- # providers may throw in per_case_context_fn, and we'd like
1017
- # `result` to still be set in these cases.
1018
- result = None
1019
- with data .provider .per_test_case_context_manager ():
1020
- # Run the test function once, via the executor hook.
1021
- # In most cases this will delegate straight to `run(data)`.
1022
- result = self .test_runner (data , run )
1013
+ with (
1014
+ local_settings (self .settings ),
1015
+ deterministic_PRNG (),
1016
+ BuildContext (data , is_final = is_final ) as context ,
1017
+ ):
1018
+ # providers may throw in per_case_context_fn, and we'd like
1019
+ # `result` to still be set in these cases.
1020
+ result = None
1021
+ with data .provider .per_test_case_context_manager ():
1022
+ # Run the test function once, via the executor hook.
1023
+ # In most cases this will delegate straight to `run(data)`.
1024
+ result = self .test_runner (data , run )
1023
1025
1024
1026
# If a failure was expected, it should have been raised already, so
1025
1027
# instead raise an appropriate diagnostic error.
0 commit comments