Artwork

Content provided by Brian Okken. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by Brian Okken or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.
Player FM - Podcast App
Go offline with the Player FM app!

221: How to get pytest to import your code under test

7:19
 
Share
 

Manage episode 421789044 series 1952312
Content provided by Brian Okken. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by Brian Okken or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.

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

  continue reading

223 episodes

Artwork
iconShare
 
Manage episode 421789044 series 1952312
Content provided by Brian Okken. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by Brian Okken or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.

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

  continue reading

223 episodes

All episodes

×
 
Loading …

Welcome to Player FM!

Player FM is scanning the web for high-quality podcasts for you to enjoy right now. It's the best podcast app and works on Android, iPhone, and the web. Signup to sync subscriptions across devices.

 

Quick Reference Guide