# Python Testing with pytest: Chapter 2 testing a package

**URL:** <https://forum.devtalk.com/t/python-testing-with-pytest-chapter-2-testing-a-package/40902>\
**Category:** PragProg Customers\
**Tags:** question, book-python-testing-with-pytest\
**Created:** [16 February 2022 08:47 UTC](https://forum.devtalk.com/t/python-testing-with-pytest-chapter-2-testing-a-package/40902 "2022-02-16T08:47:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [4 March 2022 05:20 UTC](https://forum.devtalk.com/t/python-testing-with-pytest-chapter-2-testing-a-package/40902/2 "2022-03-04T05:20:23Z")

</div>

These are great questions.

You are correct that `-e` is useful for testing code you are working on. That’s included in chapter 13, “Debugging Test Failures”, under section “Installing Cards in Editable Mode”.

Regarding testing code that is internal to a package and not exposed outside the package, see chapter 12, “Testing Scripts and Applications”, under section “Separating Code into src and tests Directories”.

However, short answer is use `pythonpath` setting. See [API Reference — pytest documentation](https://docs.pytest.org/en/7.0.x/reference/reference.html#confval-pythonpath)

---

_[View the full topic](https://forum.devtalk.com/t/python-testing-with-pytest-chapter-2-testing-a-package/40902)._
