Episode notes
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 .
More from Test & Code
-
E224 · 10 Jan 2025 · 12 min
224: pytest plugins - a full series
This episode kicks off a series on pytest plugins. In this episode: Introduction to pytest plugins The pytest.org pytest plugin list Finding pytest related packages on PyPI The Top pytest plugins list on pythontest.com Exploring popular plugins Learning from plugin examples Links: Top pytest plugins list pytest.org plugin list Top PyPI Packages And links to plugins mentioned in the show can be found at pythontest.com/top-pytest-plugins
-
E223 · 17 Nov 2024 · 22 min
223: Writing Stuff Down is a Super Power
Taking notes well can help to listen better, remember things, show respect, be more accountable, free up mind space to solve problems. This episode discusses the benefits of writing things down preparing for a meeting taking notes in meetings reviewing notes for action items, todo items, things to follow up on, etc. taking notes to allow for better focus writing well structured emails writing blog posts and books
-
E222 · 7 Sep 2024 · 12 min
222: Import within a Python package
In this episode we're talking about importing part of a package into another part of the same package. We'll look at: `from . import module` and `from .module import something` and also: `import package` to access the external API from with the package. Why would we use `import package` if `from . import api` would work fine?
-
E220 · 4 May 2024 · 41 min
220: Getting the most out of PyCon, including juggling - Rob Ludwick
PyCon US is just around the corner. I've asked Rob Ludwick to come on the show to discuss how to get the most out of your PyCon experience. There's a lot to do. A lot of activities to juggle, including actual juggling, which is where we start the conversation. Even if you never get a chance to go to PyCon, I hope this interview helps you get a feel for the welcoming aspect of the Python community. I recorded this interview as an episode for one of my other podcasts, Python People. But I think it's got some great pre-conference advice, so I'm sharing it here on Python Test as well. We talk…
-
E219 · 24 Apr 2024 · 48 min
219: Building Django Apps & SaaS Pegasus - Cory Zue
I'm starting a SaaS project using Django, and there are tons of decisions right out of the gate. To help me navigate these decisions, I've brought on Cory Zue. Cory is the creator of SaaS Pegasus , and has tons of experience with Django. Some of the topics discussed: Building Django applications SaaS Pegasus placecard.me What boilerplate projects are Django cookiecutter Cookiecutter Which database to use, probably PostgreSQL Authentication choises, probably Allauth Docker, Docker for development, Docker for deployment Deployment targets / hosting services. Render, Heroku, Fly.io, for PaaS…
-
E218 · 18 Apr 2024 · 28 min
218: Balancing test coverage with test costs - Nicole Tietz-Sokolskaya
Nicole is a software engineer and writer, and recently wrote about the trade-offs we make when deciding which tests to write and how much testing is enough. We talk about: Balancing schedule vs testing How much testing is the right about of testing Should code coverage be measured and tracked Good refactoring can reduce code coverage Is it worth testing error conditions? Are rare error codes ok to just monitor? API drift and autospec Mitigating risk Deciding what to test and what not to test Focus testing on key money-making features If there's a bug in this part of the code, how much…
-
E238 · 15 Aug 2025 · 2 min
238: So Long, and Thanks for All the Fish
A farewell to a fun 10 years. Also, I should have tested it better. :) In the audio I got the numbers wrong. Doh! This is episode 238, not 237. Oh well. I'll still be around, of course, at: pythontest.com - where I write about developing software with tests pythonbytes.fm - Python news and headlines, delivered directly to your earbuds Thanks for all the fun over the last 10 years. I wish you the best.
-
E237 · 11 Aug 2025 · 36 min
237: FastAPI Cloud - Sebastián Ramírez
In this episode, Brian interviews Sebastián Ramírez, creator of FastAPI, about its rapid rise in developer popularity and the launch of FastAPI Cloud. Sebastian explains how FastAPI Cloud addresses deployment challenges small teams face. He shares his transition from open-source to startup founder, focusing on simplifying deployment against the complexity of tools like Kubernetes. Links: FastAPI Cloud FastAPI SQLModel Typer OpenAPI Pydantic Sequoia Open Source Fellowship
-
E236 · 30 Jul 2025 · 20 min
236: Git Tips for Testing - Adam Johnson
In this episode, host Brian Okken and guest Adam Johnson explore essential Git features, highlighted by Adam's updated book, "Boost Your Git DX." Key topics include "cherry picking" for selective commits "git stash" for managing in-progress work "git diff", and specifically its `--name-only` flag, which provides a streamlined method for developers to identify which files have changed, which can be used to determine which tests need to be run "git bisect" for efficiently pinpointing bugs. This conversation offers valuable strategies for developers at any skill level to enhance their Git…
-
E235 · 22 Jul 2025 · 20 min
235: pytest-django - Adam Johnson
In this episode, special guest Adam Johnson joins the show and examines pytest-django, a popular plugin among Django developers. He highlights its advantages over the built-in unittest framework, including improved test management and debugging. Adam addresses transition challenges, evolving fixture practices, and offers tips for optimizing test performance. This episode is a concise guide for developers looking to enhance their testing strategies with pytest-django. Links: pytest-django - a plugin for pytest that provides a set of useful tools for testing Django applications and projects.
