# Python Testing with pytest, Second Edition:

**URL:** <https://forum.devtalk.com/t/python-testing-with-pytest-second-edition/96731>\
**Category:** PragProg Customers\
**Tags:** book-python-testing-with-pytest-second-edition, question\
**Created:** [15 February 2023 16:44 UTC](https://forum.devtalk.com/t/python-testing-with-pytest-second-edition/96731 "2023-02-15T16:44:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Timtonix](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/t/cdc98d/32.png) [@Timtonix](https://forum.devtalk.com/u/Timtonix)\
**Post date:** [15 February 2023 16:44 UTC](https://forum.devtalk.com/t/python-testing-with-pytest-second-edition/96731/1 "2023-02-15T16:44:27Z")

</div>

Hello @brianokken,  
I’m a french student interested in Pytest and I recently bought Python Testing With Pytest.  
I’m at Mock Chapter’s exercices and I don’t know how to solve the second one.  
"Write another test that also calls home\_dir(), but instead of checking the value, just asserts that Path.home() is called by home\_dir().

Is there a correction for these exercises ?

Thank you,  
Timothé

---

<div class="post-metadata">

**Author:** ![brianokken](https://forum.devtalk.com/user_avatar/forum.devtalk.com/brianokken/32/846_2.png) [@brianokken](https://forum.devtalk.com/u/brianokken)\
**Post date:** [6 March 2023 16:25 UTC](https://forum.devtalk.com/t/python-testing-with-pytest-second-edition/96731/2 "2023-03-06T16:25:13Z")

</div>

I don’t understand what you mean by “a correction to these exercises”?  
Do you mean you’d like to see the answer?  
Or is there a problem with the exercise?

---

<div class="post-metadata">

**Author:** ![Timtonix](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/t/cdc98d/32.png) [@Timtonix](https://forum.devtalk.com/u/Timtonix)\
**Post date:** [23 March 2023 10:55 UTC](https://forum.devtalk.com/t/python-testing-with-pytest-second-edition/96731/3 "2023-03-23T10:55:07Z")

</div>

Yes i’d like to have the answer to compare with my code !
