Home
Categories
EXPLORE
Comedy
Society & Culture
Religion & Spirituality
History
Education
True Crime
Business
About Us
Contact Us
Copyright
© 2024 PodJoint
Loading...
0:00 / 0:00
Podjoint Logo
HN
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
236 episodes
1 day 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
Episodes (20/236)
Test & Code
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 proficiency and optimize their coding workflows.


Links:

  • Boost Your Git DX - Adam's book

Help support the show AND learn pytest: 

  • The Complete pytest course is now a bundle, with each part available separately.
    • pytest Primary Power teaches the super powers of pytest that you need to learn to use pytest effectively.
    • Using pytest with Projects has lots of "when you need it" sections like debugging failed tests, mocking, testing strategy, and CI
    • Then pytest Booster Rockets can help with advanced parametrization and building plugins.
  • Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest has a course for you.

★ Support this podcast on Patreon ★
Show more...
1 week ago
20 minutes

Test & Code
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.

Help support the show AND learn pytest: 

  • The Complete pytest course is now a bundle, with each part available separately.
    • pytest Primary Power teaches the super powers of pytest that you need to learn to use pytest effectively.
    • Using pytest with Projects has lots of "when you need it" sections like debugging failed tests, mocking, testing strategy, and CI
    • Then pytest Booster Rockets can help with advanced parametrization and building plugins.
  • Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest has a course for you.

★ Support this podcast on Patreon ★
Show more...
2 weeks ago
20 minutes

Test & Code
234: pytest-metadata - provides access to test session metadata

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 is very useful even on its own.

Links:

  • pytest-metadata - The plugin we're talking about in this episode
  • pytest-base-url - Adds the base URL to the metadata.
  • pytest-html - Displays the metadata at the start of each report. 
    • See S2:E6: pytest-html - a plugin that generates HTML reports for test results
  • pytest-reporter-html1 - Presents metadata as part of the report.
  • pytest-selenium - Adds the driver, capabilities, and remote server to the metadata.

If you've got other plugins that work well with pytest-metadata, please let me know.


Sponsored by: 

  • Porkbun -- named the #1 domain registrar by USA Today from 2023 to 2025!
  • Get a .app or.dev domain name for only $5.99 first year.

Help support the show AND learn pytest: 

  • The Complete pytest course is now a bundle, with each part available separately.
    • pytest Primary Power teaches the super powers of pytest that you need to learn to use pytest effectively.
    • Using pytest with Projects has lots of "when you need it" sections like debugging failed tests, mocking, testing strategy, and CI
    • Then pytest Booster Rockets can help with advanced parametrization and building plugins.
  • Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest has a course for you.


★ Support this podcast on Patreon ★
Show more...
3 months ago
8 minutes

Test & Code
233: pytest-check - allow multiple failures per test

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 check, even if one of them fails.


pytest-check allows multiple failed "checks" per test function, so you can see the whole picture of what's going wrong.

Links:

  • pytest-check
  • Top pytest plugins

Sponsored by: 

  • Porkbun -- named the #1 domain registrar by USA Today from 2023 to 2025!
  • Get a .app or.dev domain name for only $5.99 first year.

Help support the show AND learn pytest: 

  • The Complete pytest course is now a bundle, with each part available separately.
    • pytest Primary Power teaches the super powers of pytest that you need to learn to use pytest effectively.
    • Using pytest with Projects has lots of "when you need it" sections like debugging failed tests, mocking, testing strategy, and CI
    • Then pytest Booster Rockets can help with advanced parametrization and building plugins.
  • Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest has a course for you.


★ Support this podcast on Patreon ★
Show more...
3 months ago
9 minutes

Test & Code
232: The role of AI in software testing - Anthony Shaw

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.

We discuss:

  • The promise of AI writing your tests for you
  • Downsides to not writing tests yourself
  • Bad ways to generate tests
  • Good ways to ask AI for help in writing tests
  • Tricks to get better results while using copilot and other AI tools

Links:

  • The cards project
  • A video version of this discussion: Should AI write tests?

Sponsored by: 

  • Porkbun -- named the #1 domain registrar by USA Today from 2023 to 2025!
  • Get a .app or.dev domain name for only $5.99 first year.

Help support the show AND learn pytest: 

  • The Complete pytest course is now a bundle, with each part available separately.
    • pytest Primary Power teaches the super powers of pytest that you need to learn to use pytest effectively.
    • Using pytest with Projects has lots of "when you need it" sections like debugging failed tests, mocking, testing strategy, and CI
    • Then pytest Booster Rockets can help with advanced parametrization and building plugins.
  • Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest has a course for you.


★ Support this podcast on Patreon ★
Show more...
3 months ago
58 minutes

Test & Code
231: pytest-repeat - works fine on Python 3.14

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 3.14 won't repeat with pytest-repeat


Help support the show AND learn pytest: 

  • The Complete pytest course is now a bundle, with each part available separately.
    • pytest Primary Power teaches the super powers of pytest that you need to learn to use pytest effectively.
    • Using pytest with Projects has lots of "when you need it" sections like debugging failed tests, mocking, testing strategy, and CI
    • Then pytest Booster Rockets can help with advanced parametrization and building plugins.
  • Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest has a course for you.

★ Support this podcast on Patreon ★
Show more...
4 months ago
8 minutes

Test & Code
230: Python 3.14 won't repeat with pytest-repeat

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 NEXT episode to get an explanation

Links:

  • pytest-repeat
  • Next episode: pytest-repeat - works fine on Python 3.14

Help support the show AND learn pytest: 

  • The Complete pytest course is now a bundle, with each part available separately.
    • pytest Primary Power teaches the super powers of pytest that you need to learn to use pytest effectively.
    • Using pytest with Projects has lots of "when you need it" sections like debugging failed tests, mocking, testing strategy, and CI
    • Then pytest Booster Rockets can help with advanced parametrization and building plugins.
  • Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest has a course for you.

★ Support this podcast on Patreon ★
Show more...
4 months ago
4 minutes

Test & Code
229: pytest-html - a plugin that generates HTML reports for test results

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

Help support the show AND learn pytest: 

  • The Complete pytest course is now a bundle, with each part available separately.
    • pytest Primary Power teaches the super powers of pytest that you need to learn to use pytest effectively.
    • Using pytest with Projects has lots of "when you need it" sections like debugging failed tests, mocking, testing strategy, and CI
    • Then pytest Booster Rockets can help with advanced parametrization and building plugins.
  • Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest has a course for you.

★ Support this podcast on Patreon ★
Show more...
4 months ago
6 minutes

Test & Code
228: pytest-md and pytest-md-report: Markdown reports for pytest

Markdown reports as either text or markdown tables.
Two fun plugins discussed.

Links:

  • pytest-md-report
  • pytest-md
  • Top pytest Plugins

Help support the show AND learn pytest: 

  • The Complete pytest course is now a bundle, with each part available separately.
    • pytest Primary Power teaches the super powers of pytest that you need to learn to use pytest effectively.
    • Using pytest with Projects has lots of "when you need it" sections like debugging failed tests, mocking, testing strategy, and CI
    • Then pytest Booster Rockets can help with advanced parametrization and building plugins.
  • Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest has a course for you.

★ Support this podcast on Patreon ★
Show more...
5 months ago
10 minutes

Test & Code
227: Mocking in Python with unittest.mock - Michael Foord

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 resonate within the developer community. 
This interview is just a small peek at his influence. 

In this episode

  • Introduction to Michael Foord
  • The Mock Library Origins
  • Mocking and Testing Philosophy
  • Career Path and Consulting
  • Understanding Mocking
  • The Power of Patch
  • Testing Strategies and Design
  • Mocking External Dependencies
  • Teaching Testing and Mocking

python.org has put up an "In memoriam" page for Michael Foord, and many people have shared stories and memories.

Links:

  • In memoriam: Michael Foord 1974-2025
  • 30 best practices for software development and testing


★ Support this podcast on Patreon ★
Show more...
6 months ago
47 minutes

Test & Code
226: pytest-mock : Mocking in pytest

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 became unittest.mock
  • From unittest.mock
    • patch.object
    • patch.object with autospec
    • using these as context managers
  • pytest-mock:
    • The mocker fixture 
    • Cleanup in teardown
    • Using mocker.patch, mocker.spy, and mocker.stub
    • Why it's awesome and why you might want to use it over straight unittest.mock

Links:

  • top pytest plugins list
  • pytest-mock documentation
  • unittest.mock
  • Podcast episode discussing unittest.mock with Michael Foord
  • monkeypatch

Help support the show AND learn pytest: 

  • The Complete pytest course is now a bundle, with each part available separately.
    • pytest Primary Power teaches the super powers of pytest that you need to learn to use pytest effectively.
    • Using pytest with Projects has lots of "when you need it" sections like debugging failed tests, mocking, testing strategy, and CI
    • Then pytest Booster Rockets can help with advanced parametrization and building plugins.
  • Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest has a course for you.

★ Support this podcast on Patreon ★
Show more...
6 months ago
11 minutes

Test & Code
225: pytest-cov : The pytest plugin for measuring coverage

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:

  • coverage.py
  • pytest-cov
  • how to set up context reports
  • Top pytest Plugins

Errata:

  • I mentioned that Coverage has the ability to show context (which line is covered by which test) for the past year or so.
    • However, that feature was released in Oct 2018. coverage 5.0 alpha 
    • That's over 6 years. Oops. Sorry Ned.

Help support the show AND learn pytest: 

  • The Complete pytest course is now a bundle, with each part available separately.
    • pytest Primary Power teaches the super powers of pytest that you need to learn to use pytest effectively.
    • Using pytest with Projects has lots of "when you need it" sections like debugging failed tests, mocking, testing strategy, and CI
    • Then pytest Booster Rockets can help with advanced parametrization and building plugins.
  • Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest has a course for you.

★ Support this podcast on Patreon ★
Show more...
6 months ago
13 minutes

Test & Code
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

Help support the show AND learn pytest: 

  • The Complete pytest course is now a bundle, with each part available separately.
    • pytest Primary Power teaches the super powers of pytest that you need to learn to use pytest effectively.
    • Using pytest with Projects has lots of "when you need it" sections like debugging failed tests, mocking, testing strategy, and CI
    • Then pytest Booster Rockets can help with advanced parametrization and building plugins.
  • Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest has a course for you.

★ Support this podcast on Patreon ★
Show more...
7 months ago
12 minutes

Test & Code
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

 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
Show more...
8 months ago
21 minutes

Test & Code
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?


 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
Show more...
11 months ago
12 minutes

Test & Code
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
Show more...
1 year ago
7 minutes

Test & Code
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 about: 
- Juggling at PyCon
- How to get the most out of PyCon
    - Watching talks
    - Hallway track
    - Open spaces
    - Lightening talks
    - Expo hall / vendor space
    - Poster sessions
    - Job fair
    - A welcoming community
    - Tutorials 
    - Sprints
    - But mostly about the people of Python and PyCon.

"Python enables smart people to work faster" - Rob Ludwick


 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
Show more...
1 year ago
40 minutes

Test & Code
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 options.
  • Front end frameworks. Bootstrap, Tailwind, DaisyUI, TailwindUI
  • HTMX vs React vs straight Django templates
  • Rockets
  • Font Awesome
  • and of course, SaaS Pegasus

 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
Show more...
1 year ago
47 minutes

Test & Code
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 business impact is there?
  • Performance testing needs to approximately match real world workloads
  • Cost of a service breaking vs the cost of creating, maintaining, and running tests
  • Keeping test suites quick to minimize getting distracted


Links:

  • Too much of a good thing: the trade-off we make with tests 
  • Load testing is hard, and the tools are... not great. But why?
  • Yet Another Rust Resource (YARR!)
  • Goodhart's law - "When a measure becomes a target, it ceases to be a good measure"

 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
Show more...
1 year ago
27 minutes

Test & Code
217: Podcasting / SaaS / Work Life Balance - Justin Jackson

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
  • Balancing work, side hustle, and family
  • Great places to snowboard in British Columbia

BTW. This episode was recorded last summer before I switched to transistor.fm.
I'm now on Transistor for most of a year now, and I love it.

Links from the show:

  • Transistor.fm - excellent podcast hosting, Justin is a co-founder
  • How to start a podcast in 2024
  • Podcasts from Justin
    • Build your SaaS - current
    • Build & Launch - an older one, but great
    • MegaMaker - from 2021 / 2022

 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
Show more...
1 year ago
56 minutes

Test & Code
The Python Test Podcast hosted by Brian Okken