Home
Categories
EXPLORE
True Crime
Comedy
Society & Culture
Business
Sports
Technology
Health & Fitness
About Us
Contact Us
Copyright
© 2024 PodJoint
Podjoint Logo
US
00:00 / 00:00
Sign in

or

Don't have an account?
Sign up
Forgot password
https://is1-ssl.mzstatic.com/image/thumb/Podcasts211/v4/bc/83/56/bc835690-12d4-9398-f8f8-234889fc4702/mza_11760862679876056298.jpg/600x600bb.jpg
Test & Code
Brian Okken
237 episodes
2 months ago
The Python Test Podcast hosted by Brian Okken
Show more...
Technology
Education,
How To
RSS
All content for Test & Code is the property of Brian Okken and is served directly from their servers with no modification, redirects, or rehosting. The podcast is not affiliated with or endorsed by Podjoint in any way.
The Python Test Podcast hosted by Brian Okken
Show more...
Technology
Education,
How To
https://is1-ssl.mzstatic.com/image/thumb/Podcasts211/v4/bc/83/56/bc835690-12d4-9398-f8f8-234889fc4702/mza_11760862679876056298.jpg/600x600bb.jpg
221: How to get pytest to import your code under test
Test & Code
7 minutes
1 year ago
221: How to get pytest to import your code under test

We've got some code we want to test, and some tests.
The tests need to be able to import the code under test, or at least the API to it, in order to run tests against it.
How do we do that? How do we set things up so that our tests can import our code?

In this episode, we discuss two options:

  • Installing the code under test as a pip installable package with `pip install -e /path/to/local/package`.
  • Using the pythonpath pytest setting.

 Learn pytest

  • pytest is the number one test framework for Python.
  • Learn the basics super fast with Hello, pytest!
  • Then later you can become a pytest expert with The Complete pytest Course
  • Both courses are at courses.pythontest.com
Test & Code
The Python Test Podcast hosted by Brian Okken