@@ -1010,16 +1010,18 @@ def run(data):
10101010
10111011 # self.test_runner can include the execute_example method, or setup/teardown
10121012 # _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 )
10231025
10241026 # If a failure was expected, it should have been raised already, so
10251027 # instead raise an appropriate diagnostic error.
0 commit comments