Sometimes you just want to know about your dependencies, and their dependencies. I’ve been using pipdeptree for a while, but recently switched to uv pip tree . Let’s take a look at both tools. pipdeptree pipdeptree is pip installable, but I don’t want pipdeptree itself to be reported alongside everything else installed, so I usually install it outside of a project. We can use it…
There are many great ideas that I’ve gotten from TDD, Lean, Pragmatic, and more. For the past few years, I’ve really wanted to write a book about TDD, with an emphasis on using Lean teachings to cut out all the waste, and then grow TDD into more of a project wide process. To motivate myself to just get it done finally, I’ve started. And I’m using a holistic project wide…
If you are a maintainer of a Python package, it’s nice if you pay attention to the time it takes to import your package. Further, if you’ve got a Python package with multiple components where it’s probable that many users will only use part of the package, then it’s super nice if you set up your __init__.py files for lazy importing. Previously - lazy importing other…
There’s a proposal, PEP 810 – Explicit lazy imports for Python to natively support lazy importing starting in Python 3.15. However, it has not been accepted yet, and even if it is accepted, 3.15 is a year away. What do we do now? The techniques covered in this post that allow you to use lazy importing NOW with Python 3.13, Python 3.12, …, really every version of Python. Let’s…
The easiest way to install Python 3.14 (or 3.13, 3.12, 3.11, 3.10, 3.10, …) I originally wrote this post in 2022 for Python 3.11. From 2022 through 2024, I remained of the belief that installing from python.org was the best option for most people. However, 2025 changed that for me, with uv and uv python supporting the installation of Python versions. It’s a really pleasant and clean…
Python 3.14 is here. If you haven’t done so, it’s time to update your projects to test against 3.14. The following procedure is what I’m following for a handful of projects. Your process of course may be different if you use different tools. Honestly, I’m partly writing this down so I don’t have to remember it all in a year when 3.15 rolls around. Installing Python…
There’s a new release of pytest-check . Version 2.6.0. This is a cool contribution from the community. The problem In July, bluenote10 reported that check.raises() doesn’t behave like pytest.raises() in that the AssertionError returned from check.raises() doesn’t have a queryable value . Example of pytest.raises() : with pytest . raises ( Exception ) as e : do_something () assert…
There are a lot of events in the history of software development. This is a list of dates that have some significance in either the stuff I work with or methodologies. I’ve compiled this list for my own benefit in thinking about my history and how these things have led to my current software philosophies. I’m publishing the list as a “what the heck, why not?” kinda thing.…
Like the recent archival of Test and Code , the Python People podcast has also moved. Python People is now at pythontest.com/pythonpeople . Is it also archived? As in done? I don’t think so. I think I might start that up again at some point. But for now, it’s on a long-ish term pause. BTW, the RSS feeds for both Python People and Test and Code should be redirected correctly, so you…
I really appreciate all of the positive feedback I’ve gotten when I announced that I was stopping the Test & Code podcast. I mean, I didn’t get any “good idea, you that’s a terrible show” feedback, thankfully. But I did get a lot of people saying that I should keep it alive somehow. So, it’s now archived here: Test and Code Archive That link also includes a link…
Test and Code Episode Archive XML feed URL for podcast players 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…
Test and Code Episode Archive XML feed URL for podcast players 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…
In 2013/2014 I wrote a 4 part series on pytest fixtures. It started out fine-ish. And then by part 4 I crammed way too many concepts into one huge post. Well, I’ve recently reviewed all of this, and split the posts into one concept each made sure all of the info was correct for modern versions of Python and pytest reran the examples to make sure the output is correct Here’s the new/old…
Test and Code Episode Archive XML feed URL for podcast players 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…
Test and Code Episode Archive XML feed URL for podcast players 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…
I’m doing some blog cleanup. New look I just recently have this shiny new theme for the blog. I’m really loving the colors, and the ability to shamelessly plug my courses in the right side-bar. (Below the content if you’re reading on mobile). New analytics I don’t want to track anyone. But I do want to know: which posts are popular which not so much what are people 404-ing…
Brett Cannon recently released a great article explaining how Python 3.14’s new t-strings work. Here’s the article: Unravelling t-strings . He built up the functionality of how t-strings work in a way that you can follow along even if you don’t have 3.14.0b1 (where t-strings are instroduced), all the way up to the last example. He walks through Evaluating the Python expression…
Test and Code Episode Archive XML feed URL for podcast players pytest-metadata is described as a plugin for pytest that provides access to test session metadata. That is such a humble description for such a massively useful plugin. If you're already using pytest-html, you have pytest-metadata already installed, as pytest-metadata is one of the dependencies for pytest-html. However, pytest-metadata…
Test and Code Episode Archive XML feed URL for podcast players pytest-check is a pytest plugin that allows multiple failures per test. Normally, a test function will fail and stop running with the first failed assert. That's totally fine for tons of kinds of software tests. However, there are times where you'd like to check more than one thing, and you'd really like to know the results of each…
Test and Code Episode Archive XML feed URL for podcast players AI is helping people write code. Tests are one of those things that some people don't like to write. Can AI play a role in creating automated software tests? Well, yes. But it's a nuanced yes. Anthony Shaw comes on the show to discuss the topic and try to get AI to write some test for my very own cards project.
Test and Code Episode Archive XML feed URL for podcast players pytest-repeat is a pytest plugin that makes it easy to repeat a single test, or multiple tests, a specific number of times. works fine on Python 3.14 is tested on Python 3.9-3.14 probably works fine still on 3.7 & 3.8 This episode also discusses the attempted April Fools episode. Links: pytest-repeat The April Fools episode: Python…
Test and Code Episode Archive XML feed URL for podcast players pytest-repeat is a pytest plugin that makes it easy to repeat a single test, or multiple tests, a specific number of times. Note: This was an April Fools attempt, so the statement ... "Unfortunately, it doesn't seem to work with Python 3.14, even though there is no rational reason why it shouldn't work." ... is NOT true. Listen to the…
Test and Code Episode Archive XML feed URL for podcast players pytest-html has got to be one of my all time favorite plugins. pytest-html is a plugin for pytest that generates a HTML report for test results. This episode digs into some of the super coolness of pytest-html. pytest-html repo readme with screenshot enhancing reports pytest-metadata Transcript pytest-html has got to be one of my…
Test and Code Episode Archive XML feed URL for podcast players Markdown reports as either text or markdown tables. Two fun plugins discussed. Links: pytest-md-report pytest-md Top pytest Plugins Transcript The standard pytest output is actually pretty good. It’s come a long way since I started using pytest. There’s nice percentages if even by default, you can see the test files that…
Test and Code Episode Archive XML feed URL for podcast players This episode is a replay of a 2021 interview I did with Michael Foord. We lost Michael in January, and I'd like to revisit this interview as a tribute. Michael Foord was a pivotal figure in the Python community and the creator of the mock library that's now unittest.mock. But he did so much more as well. His contributions continue to…
Test and Code Episode Archive XML feed URL for podcast players pytest-mock is currently the #3 pytest plugin. pytest-mock is a wrapper around unittest.mock. In this episode: Why the pytest-mock plugin is awesome What is mocking, patching, and monkey patching What, if any, is the difference between mock, fake, spy, stub. Why we might need these in testing Some history of mock in Python and how mock…
Test and Code Episode Archive XML feed URL for podcast players pytest-cov is a pytest plugin that helps produce coverage reports using Coverage.py. In this episode, we'll discuss: what Coverage.py is why you should measure code coverage on both your source and test code what pytest-cov is extra features pytest-cov gives you over and above coverage.py and generally why using both is awesome Links:…
Test and Code Episode Archive XML feed URL for podcast players 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…
I noticed a fun post by Ned Batchelder called Testing some tidbits . The post looks at different ways to see if a string has only 0 or 1 in it. He posted a few ways on Bluesky/Mastodon and got a bunch of replies with more ways. And then wrote a small script to check to see if they worked. It’s a fun post, and from it I learned about: cleandoc - a way to strip leading blank space and maintain…
Test and Code Episode Archive XML feed URL for podcast players 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…
If you’re looking for a great place to learn pytest, I recommend the course or book below. However, I’m biased, as I’m the creator of both. Resources Python Testing with pytest, 2nd Edition - book - Great for learning pytest offline pytest Courses - video - Great for learning pytest online PythonTest Community - Discord community focused on pytest - ask/answer pytest and other…
Test and Code Episode Archive XML feed URL for podcast players 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?
This is intended to find the most popular (as determined by download count) pytest plugins, as plugins usually have “pytest” in the name. Counts are the number of downloads over 30 days. The list Data last updated: 2026-08-01 06:34:08 # Package Downloads Summary 1 pytest-asyncio 275,917,521 pytest support for asyncio 2 pytest-json-ctrf 273,013,127 pytest plugin to generate json report…
What are the top downloaded pytest plugins? I want to know this. And I’d like the answer updated regularly. So today I decided to write a script to do that for me. Grab data Let’s start with Top PyPI Packages from Hugo van Kemenade . This list is “A monthly dump of the 8,000 most-downloaded packages from PyPI.” Perfect. Parse Now: Filter for “pytest” in the…
Test and Code Episode Archive XML feed URL for podcast players 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:
This is a really fun talk with Shauna. We talk about: Going from academia to tech Django Open source project governance and Governing Open Womens Soccer and the NWSL Shauna's technical consulting business is Galaxy Rise Consulting Show notes and resources can be found at pythontest.com/pythonpeople Guests: Shauna Gordon-McKeon
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.
Test and Code Episode Archive XML feed URL for podcast players 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…
Test and Code Episode Archive XML feed URL for podcast players 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…
Test and Code Episode Archive XML feed URL for podcast players 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…
Test and Code Episode Archive XML feed URL for podcast players If you've ever thought about starting a podcast or a SaaS project, you'll want to listen to this episode. Justin is one of the people who motivated me to get started podcasting. He's also running a successful SaaS company, transistor.fm , which hosts this podcast. Topics: Podcasting Building new SaaS (software as a service) products…
Test and Code Episode Archive XML feed URL for podcast players Charlie Marsh and team are using Rust to make Python tooling faster. Ruff can take the place of Flake8, isort, and Black, and so much more. uv can take the place of pip, pip-tools, and virtualenv Astral is Charlie's venture backed company, and what they have with `ruff` and `uv` is just the start. Since uv is the newest tool, there's…
Test and Code Episode Archive XML feed URL for podcast players Software engineers that move into leadership roles have a struggle between learning leadership skills, maintaining technical skills, and learning new leadership and technical skills. Matt Makai went from individual contributor to developer relations to leadership in devrel. We discuss how to stay technical, as well as dive into some…
Nikita Karamov is a Python developer and maintainer on various open source Python projects. Some topics covered: Notes on university education in programming and engineering vs theory Jazzband for maintaining Django projects Contributing to open source makes you a better programmer Moving from Russia to Germany during college Cultural differences between Russia, Germany, and Oregon The nice lack…
Test and Code Episode Archive XML feed URL for podcast players If you haven't tried running automated tests, especially with pytest, in VS Code recently, you should take another look. The Python for VS Code interface for testing, especially for pytest, has changed recently. On this episode we discuss the change with the software engineer working on the pytest changes, Eleanor Boyd, and the product…
pytest 8.0.0 was released on 17-Jan-2024, and I’m pretty excited about it. I’m not going to cover all fo the changes, I’ll just highlight a few. For full set of changes, see the pytest changelog : Changes in 8.0.0rc1 Changes in 8.0.0rc2 Changes in 8.0.0 Version Compatibility Dropped support for Python 3.7, as it reached EOL last June. Features and Improvements Improved Diffs…
Test and Code Episode Archive XML feed URL for podcast players If a test fails in a test suite, I'm going to want to re-run the test. I may even want to re-run a test, or a subset of the suite, a bunch of times. There are a few pytest plugins that help with this: pytest-repeat pytest-rerunfailures pytest-flakefinder pytest-instafail We talk about each of these in this episode. Transcript…
Pamela Fox is a Python Cloud Developer Advocate at Microsoft. Topics include: Girl Develop It Django Girls Girls Who Code Teaching a language vs teaching a tool What a dev advocate does Accessibility (A11y) testing Playwright axe-core Snapshot testing pytest plugin authoring Flask SQLAlchemy Relearning Go Links from the show: Python Bytes 323 with Pamela: AI search wars have begun Python Test 199…
Julian Sequeira is a cofounder of Pybites. He's a Python coach, a podcaster, a career mindset advocate, and is learning guitar. Topics include: Learning guitar Vacationing in Canada Pybites Splitting finances with Bob Building a community and a team Coaching Conscious positivity Australia is full of animals that want to kill you. Except kangaroos. Teaching Python to non-technical people Show notes…
Test and Code Episode Archive XML feed URL for podcast players In 2002, Kent Beck released a book called "Test Driven Development by Example". In December of 2023, Kent wrote an article called "Canon TDD". With Kent's permission, this episode contains the full content of the article. Brian's commentary is saved for a followup episode. Links: Canon TDD Test Driven Development by Example Transcript…