From 3f322d022b69694855cc202c8f9a4d343cab0144 Mon Sep 17 00:00:00 2001 From: Marvellous Osuolale Date: Sun, 24 Oct 2021 15:23:46 +0100 Subject: [PATCH] Update 08_request_finalizers.md fixed reference to the wrong line. I am assuming this should be line 26 not 11. --- tutorials/08_request_finalizers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/08_request_finalizers.md b/tutorials/08_request_finalizers.md index 51ac1a30..45924f1f 100644 --- a/tutorials/08_request_finalizers.md +++ b/tutorials/08_request_finalizers.md @@ -13,7 +13,7 @@ pytest -vs tests/07_request_finalizer_test.py As usual, we can see that our fixture runs first (including a "risky" function call), followed by our test case, and finally our safe_cleanup function. One advantage of this approach is that we can re-use a shared cleanup function, but the main benefit is that even if our fixture fails to initialize, our finalizer "cleanup" function still gets run! -To really see the finalizer in action, uncomment line 11 in `07_request_finalizer_test.py` (e.g. the commented-out "raise Exception" call), and re-run the test using the command above. +To really see the finalizer in action, uncomment line 26 in `07_request_finalizer_test.py` (e.g. the commented-out "raise Exception" call), and re-run the test using the command above. That "risky" function didn't work out - it derailed our fixture, and our test case never even ran! But despite all that, our `safe_cleanup` function still got called. @@ -21,4 +21,4 @@ And in a real test, with a fixture that sets up something complicated or expensi ### Up Next: -[Intro to Parameters](https://github.com/pluralsight/intro-to-pytest/blob/master/tutorials/09_intro_to_parameters.md) \ No newline at end of file +[Intro to Parameters](https://github.com/pluralsight/intro-to-pytest/blob/master/tutorials/09_intro_to_parameters.md)