Test & Code artwork

Test & Code

197 episodes - English - Latest episode: about 1 year ago - ★★★★★ - 59 ratings

Topics include automated testing, testing strategy, software engineering practices, packaging, Python, pytest, data science, TDD, continuous integration, and software methodologies.
Also anything I think helps make the daily life of a software developer more fun and rewarding.
Hosted by Brian Okken.

Technology Education How To python programming software testing
Homepage Apple Podcasts Google Podcasts Overcast Castro Pocket Casts RSS feed

Episodes

195: What would you change about pytest?

March 08, 2023 08:00 - 57 minutes - 39.4 MB

Anthony Sottile and Brian discuss changes that would be cool for pytest, even unrealistic changes. These are changes we'd make to pytest if we didn't ahve to care about backwards compatibilty. Anthony's list: The import system Multi-process support out of the box Async support Changes to the fixture system Extend the assert rewriting to make it modular Add matchers to assert mechanism Ban test class inheritance Brian's list: Extend assert rewriting for custom rewriting, like check pytester m...

194: Test & Code Returns

March 05, 2023 21:15 - 6 minutes - 4.22 MB

A brief discussion of why Test & Code has been off the air for a bit, and what to expect in upcoming episodes.

193: The Good Research Code Handbook - Patrick Mineault

August 30, 2022 15:15 - 43 minutes - 29.7 MB

I don't think it's too much of a stretch to say that software is part of most scientific research now. From astronomy, to neuroscience, to chemistry, to climate models. If you work in research that hasn't been affected by software yet, just wait. But how good is that software? How much of common best practices in software development are making it to those writing software in the sciences? Patrick Mineault has written "The Good Research Code Handbook". It's a website. It's concise. And it...

192: Learn to code through game development with PursuedPyBear - Piper Thunstrom

August 06, 2022 23:15 - 42 minutes - 29.2 MB

The first game I remember coding, or at least copying from a magazine, was in Basic. It was Lunar Lander. Learning to code a game is a way that a lot of people get started and excited about programming. Of course, I don't recommend Basic. Now we've got Python. And one of the game engines available for Python is PursuedPyBear, a project started by Piper Thunstrom. Piper joins us this episode and we talk about PursuedPyBear, learning to code, and learning CS concepts with game developme...

191: Running your own site for fun and absolutely no profit whatsoever - Brian Wisti

July 01, 2022 17:45 - 46 minutes - 31.7 MB

Having a personal site is a great playground for learning tons of skills. Brian Wisti discusses the benefits of running a his own blog over the years. Special Guest: Brian Wisti.

190: Testing PyPy - Carl Friedrich Bolz-Tereick

June 21, 2022 12:00 - 51 minutes - 35.3 MB

PyPy is a fast, compliant alternative implementation of Python. cPython is implemented in C. PyPy is implemented in Python. What does that mean? And how do you test something as huge as an alternative implementation of Python? Special Guest: Carl Friedrich Bolz-Tereick.

189: attrs and dataclasses - Hynek Schlawack

June 07, 2022 21:30 - 32 minutes - 22.3 MB

In Python, before dataclasses, we had attrs. Before attrs, it wasn't pretty. The story of attrs and dataclasses is actually intertwined. They've built on each other. And in the middle of it all, Hynek. Hynek joins the show today to discuss some history of attrs and dataclasses, and some differences. If you ever need to create a custom class in Python, you should listen to this episode. Full Transcript (https://pythontest.com/testandcode/189-attrs-dataclasses-hynek-schlawack/) Special Guest: ...

188: Python's Rich, Textual, and Textualize - Innovating the CLI

May 17, 2022 13:15 - 35 minutes - 24.5 MB

Will McGugan has brought a lot of color to CLIs within Python due to Rich. Then Textual started rethinking full command line applications, including layout with CSS. And now Textualize, a new startup, is bringing CLI apps to the web. Full Transcript (https://pythontest.com/testandcode/188-python-rich-textual-textualize-innovating-cli/) Special Guest: Will McGugan.

187: Teaching Web Development, including Front End Testing

May 13, 2022 12:45 - 39 minutes - 27.4 MB

When you are teaching someone web development skills, when is the right time to start teaching code quality and testing practices? Karl Stolley believes it's never too early. Let's hear how he incorporates code quality in his courses. Our discussion includes: starting people off with good dev practices and tools linting html and css validation visual regression testing using local dev servers, including https incorporating testing with git hooks testing to aid in css optimization and refactor...

186: Developer and Team Productivity

May 12, 2022 07:00 - 51 minutes - 35.2 MB

Being productive is obviously a good thing. Can we measure it? Should we measure it? There's been failed attempts, like lines of code, etc. in the past. Currently, there are new tools to measure productivity, like using git metrics. Nick Hodges joins the show to discuss the good and the bad of developer and team productivity, including how we can improve productivity. Full Transcript (https://pythontest.com/testandcode/186-developer-team-productivity/) Special Guest: Nick Hodges.

185: Python + Django + Rich + Testing == Awesome

May 11, 2022 07:00 - 20 minutes - 14.4 MB

Django has a handful of console commands to help manage and develop sites. django-rich (https://pypi.org/project/django-rich/) adds color and nice formatting. Super cool. In a recent release, django-rich also adds nice colorized tracebacks to the Django test runner. Full Transcript (https://pythontest.com/testandcode/185-python-django-rich-testing-awesome/) Special Guests: Adam Johnson and David Smith.

184: Twisted and Testing Event Driven / Asynchronous Applications - Glyph

March 21, 2022 12:00 - 41 minutes - 28.4 MB

Twisted has been supporting asynchronous / event driven applications way before asyncio. Twisted, and Glyph, have also been encouraging automated tests for a very long time. Twisted uses a technique that should be usable by other applications, even those using asyncio or other event driven architectures. Full Transcript (https://pythontest.com/testandcode/184-twisted-testing-event-driven-async-apps/) Special Guest: Glyph.

183: Managing Software Teams - Ryan Cheley

March 17, 2022 04:15 - 47 minutes - 32.9 MB

Ryan Cheley joins me today to talk about some challenges of managing software teams, and how to handle them. We end up talking about a lot of skills that are excellent for software engineers as well as managers. Some topics discussed: handling code reviews asking good questions being honest about what you can't do with current resources and data discussing tradeoffs and offering solutions that can be completed faster than the ideal solution balancing engineering and managing making sure docum...

182: An Unorthodox Technical Interview and Hiring Process - Nathan Aschbacher

March 08, 2022 16:15 - 47 minutes - 32.9 MB

Don't you just love technical interviews, with someone who just saw your resume or CV 5 minutes ago asking you to write some code on a whiteboard. Probably code that has nothing to do with anything you've done before or anything you will do at the company. No? Neither does Nathan Aschbacher. So when he started building the team at his company, he decided to do things differently. Hiring is one of the essential processes for building a great team. However, it's a high noise, low signal proces...

181: Boost Your Django DX - Adam Johnson

March 01, 2022 06:00 - 27 minutes - 19 MB

We talk with Adam Johnson about his new book, "Boost Your Django DX". Developer experience includes tools and practices to make developers more effective and efficient, and just plain make software development more fun and satisfying. One of the things I love about this book is that it's not just for Django devs. I'd guess that about half the book is about topics that all Python developers would find useful, from virtual environments to linters to testing. But of course, also tons of tips...

180: Lean TDD

February 21, 2022 08:00 - 26 minutes - 18 MB

Lean TDD is an attempt to reconcile some conflicting aspects of Test Driven Development and Lean Software Development. I've mentioned Lean TDD on the podcast a few times and even tried to do a quick outline at the end of episode 162 (https://testandcode.com/162). This episode is a more complete outline, or at least a first draft. If you feel you've got a good understanding of TDD, and it's working awesome for you, that's great. Keep doing what you're doing. There are no problems. For me, the ...

179: Exploratory Testing

February 09, 2022 05:45 - 11 minutes - 8.07 MB

Exploratory testing is absolutely an essential part of a testing strategy. This episode discusses what exploratory testing is, its benefits, and how it fits within a framework of relying on automated tests for most of our testing. Full Transcript (https://pythontest.com/testandcode/179-exploratory-testing/)

178: The Five Factors of Automated Software Testing

January 31, 2022 20:00 - 10 minutes - 7.24 MB

"There are five practical reasons that we write tests. Whether we realize it or not, our personal testing philosophy is based on how we judge the relative importance of these reasons." - Sarah Mei This episode discusses the factors. Sarah's order: Verify the code is working correctly Prevent future regressions Document the code’s behavior Provide design guidance Support refactoring Brian's order: Verify the code is working correctly Prevent future regressions Support refactoring Provide desig...

177: Unit Test vs Integration Test and The Testing Trophy

January 28, 2022 05:15 - 21 minutes - 14.9 MB

A recent Twitter thread by Simon Willison reminded me that I've been meaning to do an episode on the testing trophy. This discussion is about the distinction between unit and integration tests, what those terms mean, and where we should spend our testing time. Full Transcript (https://pythontest.com/testandcode/177-unit-test-integration-test-testing-trophy/)

176: SaaS Side Projects

January 18, 2022 08:00 - 26 minutes - 18 MB

The idea of having a software as a service product sound great, doesn't it? Solve a problem with software. Have a nice looking landing page and website. Get paying customers. Eventually have it make enough revenue so you can turn it into your primary source of income. There's a lot of software talent out there. We could solve lots of problems. But going from idea to product to first customer is non-trivial. Especially as a side hustle. This episode discusses some of the hurdles from ...

175: Who Should Do QA?

January 12, 2022 08:00 - 13 minutes - 9.06 MB

Who should do QA? How does that change with different projects and teams? What does "doing QA" mean, anyway? Answering these questions are the goals of this episode. Full Transcript (https://pythontest.com/testandcode/175-who-should-do-qa/)

174: pseudo-TDD - Paul Ganssle

December 22, 2021 19:00 - 39 minutes - 27.1 MB

In this episode, I talk with Paul Ganssle about a fun workflow that he calls pseudo-TDD. Pseudo-TDD is a way to keep your commit history clean and your tests passing with each commit. This workflow includes using pytest xfail and some semi-advanced version control features. Some strict forms of TDD include something like this: - write a failing test that demonstrates a lacking feature or defect - write the source code to get the test to pass - refactor if necessary - repeat In reality, at lea...

173: Why NOT unittest?

December 17, 2021 20:00 - 23 minutes - 16.2 MB

In the preface of "Python Testing with pytest" I list some reasons to use pytest, under a section called "why pytest?". Someone asked me recently, a different but related question "why NOT unittest?". unittest is an xUnit style framework. For me, xUnit style frameworks are fatally flawed for software testing. That's what this episode is about, my opinion of * "Why NOT unittest?", or more broadly, * "What are the fatal flaws of xUnit?" Full Transcript (https://pythontest.com/testandcode/173-...

172: Designing Better Software with a Prototype Mindset

November 30, 2021 08:00 - 6 minutes - 4.79 MB

A prototype is a a preliminary model of something, from which other forms are developed or copied. In software, we think of prototypes as early things, or a proof of concept. We don't often think of prototyping during daily software development or maintenance. I think we should. This episode is about growing better designed software with the help of a prototype mindset. Full Transcript (https://pythontest.com/testandcode/172-designing-better-software-prototype-mindset/)

171: How and why I use pytest's xfail - Paul Ganssle

November 22, 2021 08:00 - 38 minutes - 26.5 MB

Paul Ganssle, is a software developer at Google, core Python dev, and open source maintainer for many projects, has some thoughts about pytest's xfail. He was an early skeptic of using xfail, and is now an proponent of the feature. In this episode, we talk about some open source workflows that are possible because of xfail. Full Transcript (https://pythontest.com/testandcode/171-use-pytest-xfail/) Special Guest: Paul Ganssle.

170: pytest for Data Science and Machine Learning - Prayson Daniel

November 18, 2021 05:30 - 45 minutes - 31.1 MB

Prayson Daniel, a principle data scientist, discusses testing machine learning pipelines with pytest. Prayson is using pytest for some pretty cool stuff, including: * unit tests, of course * testing pipeline stages * counterfactual testing * performance testing All with pytest. So cool. Full Transcript (https://pythontest.com/testandcode/170-pytest-data-science-machine-learning/) Special Guest: Prayson Daniel.

169: Service and Microservice Performance Monitoring - Omri Sass

November 11, 2021 18:00 - 30 minutes - 20.8 MB

Performance monitoring and error detection is just as important with services and microservices as with any system, but with added complexity. Omri Sass joins the show to explain telemetry and monitoring of services and of systems with services. Full Transcript (https://pythontest.com/testandcode/169-service-microservice-performance-monitoring/) Special Guest: Omri Sass.

168: Understanding Complex Code by Refactoring into Larger Functions

November 02, 2021 14:15 - 11 minutes - 7.84 MB

To understand complex code, it can be helpful to remove abstractions, even if it results in larger functions. This episode walks through a process I use to refactor code that I need to debug and fix, but don't completely understand. Full Transcript (https://pythontest.com/testandcode/168-understanding-complex-code-refactoring/)

167: React, TypeScript, and the Joy of Testing - Paul Everitt

October 22, 2021 04:15 - 36 minutes - 25.4 MB

Paul has a tutorial on testing and TDD with React and TypeScript. We discuss workflow and the differences, similarities between testing with React/TypeScript and Python. We also discuss what lessons that we can bring from front end testing to Python testing. Full Transcript (https://pythontest.com/testandcode/167-react-typescript-joy-testing/) Special Guest: Paul Everitt.

166: unittest expectedFailure and xfail

October 14, 2021 17:45 - 6 minutes - 4.45 MB

xfail isn't just for pytest tests. Python's unittest has @unittest.expectedFailure. In this episode, we cover: - using @unittest.expectedFailure - the results of passing and failing tests with expectedFailure - using pytest as a test runner for unittest - using pytest markers on unittest tests Docs for expectedFailure: https://docs.python.org/3/library/unittest.html#skipping-tests-and-expected-failures Some sample code. unittest only: ```python import unittest class ExpectedFailureTestCase...

165: pytest xfail policy and workflow

October 07, 2021 22:15 - 9 minutes - 6.75 MB

A discussion of how to use the xfail feature of pytest to help with communication on software projects. The episode covers: * What is xfail * Why I use it * Using reason effectively by including issue tracking numbers * Using xfail_strict * Adding --runxfail when transitioning from development to feature freeze * What to do about test failures * How all of this might help with team communication Full Transcript (https://pythontest.com/testandcode/165-pytest-xfail-policy-workflow/)

164: Debugging Python Test Failures with pytest

September 14, 2021 16:30 - 13 minutes - 9.19 MB

An overview of the pytest flags that help with debugging. From Chapter 13, Debugging Test Failures, of Python Testing with pytest, 2nd edition (https://pythontest.com/pytest-book/). pytest includes quite a few command-line flags that are useful for debugging. We talk about thes flags in this episode. Flags for selecting which tests to run, in which order, and when to stop: * -lf / --last-failed: Runs just the tests that failed last. * -ff / --failed-failed: Runs all the tests, starting with ...

163: pip install ./local_directory - Stéphane Bidoul

August 20, 2021 19:30 - 29 minutes - 20.4 MB

pip : "pip installs packages" or maybe "Package Installer for Python" pip is an invaluable tool when developing with Python. A lot of people know pip as a way to install third party packages from pypi.org You can also use pip to install from other indexes (or is it indices?) You can also use pip to install a package in a local directory. That's the part I want to jump in and explore with Stéphane Bidoul. The way pip installs from a local directory is about to change, and the story is fascinat...

162: Flavors of TDD

August 03, 2021 19:00 - 22 minutes - 15.7 MB

What flavor of TDD do you practice? In this episode we talk about: * Classical vs Mockist TDD * Detroit vs London (I actually refer to it in the episode as Chicago instead of Detroit. Oh well.) * Static vs Behavior * Inside Out vs Outside In * Double Loop TDD * BDD * FDD * Tracer Bullets * Rules of TDD * Team Structure * Lean TDD This is definitely an episode I'd like feedback on. Reach out to me @brianokken (https://twitter.com/brianokken) or via the contact form (https://testandcode.com/c...

161: Waste in Software Development

July 20, 2021 15:15 - 18 minutes - 13 MB

Software development processes create value, and have waste, in the Lean sense of the word waste. Lean manufacturing and lean software development changed the way we look at value and waste. This episode looks at lean definitions of waste, so we can see it clearly when we encounter it. I'm going to use the term waste and value in future episodes. I'm using waste in a Lean sense, so we can look at software processes critically, see the value chain, and try to reduce waste. Lean manufacturing a...

160: DRY, WET, DAMP, AHA, and removing duplication from production code and test code

July 08, 2021 20:00 - 14 minutes - 10.1 MB

Should your code be DRY or DAMP or something completely different? How about your test code? Do different rules apply? Wait, what do all of these acronyms mean? We'll get to all of these definitions, and then talk about how it applies to both production code and test code in this episode. Full Transcript (https://pythontest.com/testandcode/160-dry-wet-damp-aha/)

159: Python, pandas, and Twitter Analytics - Matt Harrison

July 02, 2021 13:00 - 47 minutes - 32.9 MB

When learning data science and machine learning techniques, you need to work on a data set. Matt Harrison had a great idea: Why not use your own Twitter analytics data? So, he did that with his own data, and shares what he learned in this episode, including some of his secrets to gaining followers. In this episode we talk about: Looking at your own Twitter analytics data. Using Python, pandas, Jupyter for data cleaning and exploratory analysis Data visualization Machine learning, principal co...

158: TDD in Swift - Gio

June 18, 2021 22:00 - 43 minutes - 29.8 MB

Iterative processes that include writing test code and production code together, such as TDD, help make coding fun. All of us that care about developing quality code with the help of testing can learn from each other, regardless of programming language. Today we step outside our normal Python comfort zone and talk with Gio about TDD in Swift. Gio Lodi, author of TDD in Swift, joins the show to discuss Test Driven Development, software workflows, bottom up vs top down, rapid feedback, develo...

157: pre-commit - Anthony Sottile

June 11, 2021 07:00 - 41 minutes - 28.7 MB

pre-commit started as a framework for running linters and code formatters during git actions via git hooks. It's grown and expanded and now supports an extensive list of languages and actions and manual running of actions. But even at it's core, it's great for letting computers nitpick about whitespace and formatting, so that code reviews can focus on architecture and design. Anthony Sottile discusses pre-commit, for using locally by developers, and pre-commit.ci, which can run actions durin...

156: Flake8: Python linting framework with Pyflakes, pycodestyle, McCabe, and more - Anthony Sottile

June 03, 2021 22:45 - 22 minutes - 15.8 MB

Flake8 is a command-line tool for linting Python projects. By default, it includes lint checks provided Pyflakes, pycodestyle, and McCabe It's also a platform, and allows plugins to extend the checks. Flake8 will run third-party extensions if they are found and installed. But what does all of that mean? Anthony Sottile is a maintainer of flake8 and has kindly offered to explain it to us. Full Transcript (https://pythontest.com/testandcode/156-flake8-python-linting-pyflakes-pycodestyle-mccabe...

155: Four Questions to Ask Frequently During Software Projects - Tim Ottinger

May 28, 2021 22:30 - 22 minutes - 15.7 MB

Tim Ottinger has four questions that work great in many situations, from doing homework, to cooking, to writing code, to entire software projects. They are actually awesome questions to ask during a software project. We discuss the questions, where they came from, and look at some uses in software. The questions: What is it that needs to be done? What do we need in order to do it? Where can we get what we need? How can we tell if we’re doing it right? Bonus question that can be swapped out fo...

154: Don't Mock your Database - Jeff Triplett

May 21, 2021 20:15 - 31 minutes - 21.8 MB

You need tests for your web app. And it has a database. What do you do with the database during testing? Should you use the real thing? or mock it? Jeff Triplett says don't mock it. In this episode, we talk with Jeff about testing web applications, specifically Django apps, and of course talk about the downsides of database mocking. Full Transcript (https://pythontest.com/testandcode/154-dont-mock-database) Special Guest: Jeff Triplett.

153: Playwright for Python: end to end testing of web apps - Ryan Howard

May 14, 2021 05:15 - 31 minutes - 21.7 MB

Playwright is an end to end automated testing framework for web apps with Python support and even a pytest plugin. Full Transcript (https://pythontest.com/testandcode/153-playwright-python-testing-web-apps) Special Guest: Ryan Howard.

152: Python Packaging - Brett Cannon

May 07, 2021 05:00 - 49 minutes - 34.2 MB

I always learn a lot when I talk to Brett, and this episode is no exception. We talk about the packaging workflow, tools, changes, pyproject.toml, flit, setuptools, and so much more. I hope you learn as much as I did in this great discussion. Full Transcript (https://pythontest.com/testandcode/152-python-packaging) Special Guest: Brett Cannon.

151: Python Adventure - Brandon Rhodes

April 28, 2021 02:15 - 56 minutes - 38.9 MB

Adventure, or Colossal Cave Adventure, was written between 1975 and 1977 in Fortran. Brandon Rhodes ported it to Python 3, initial release in 2011, and still maintains it. We talk to Brandon about this wonderful game. ``` YOU ARE STANDING AT THE END OF A ROAD BEFORE A SMALL BRICK BUILDING. AROUND YOU IS A FOREST. A SMALL STREAM FLOWS OUT OF THE BUILDING AND DOWN A GULLY. east A bit later... IT IS NOW PITCH DARK. IF YOU PROCEED YOU WILL LIKELY FALL INTO A PIT. light(lamp) YOUR LAMP IS NOW ON...

150: A Practical Testing Strategy

April 15, 2021 07:15 - 10 minutes - 7.32 MB

Coming up with a testing strategy doesn't have to be stressful. Prioritizing features to test, and generating test cases for each feature can be fairly quick and painless. This episode covers a strategy for both that can be applied to many types of software. Full Transcript (https://pythontest.com/testandcode/150-practical-testing-strategy)

149: I don't test my code, "crappy Python" is all I write - Corey Quinn

March 31, 2021 03:30 - 49 minutes - 34.1 MB

Corey Quinn is the Chief Cloud Economist at The Duckbill Group. He's also a podcaster and writes a newsletter. And he also automates things with Python. But he doesn't write tests. Let's find out why. Reason for the interview. Rough summary of a twitter conversation: Corey: What podcasts should I try to get an invite onto? ToonArmyCaptain: Python Bytes, Test & Code, Talk Python Corey: But... I don't test my code, "crappy Python" is all I write, and I'd feel like a giant imposter. So yeah, I'd...

148: Coverage.py and testing packages

March 12, 2021 08:00 - 14 minutes - 9.76 MB

How do you test installed packages using coverage.py? Also, a couple followups from last week's episode on using coverage for single file applications. Full Transcript (https://pythontest.com/testandcode/148-coverage-testing-packages)

147: Testing Single File Python Applications/Scripts with pytest and coverage

March 06, 2021 02:00 - 11 minutes - 7.9 MB

Have you ever written a single file Python application or script? Have you written tests for it? Do you check code coverage? This is the topic of this weeks episode, spurred on by a listener question. The questions: * For single file scripts, I'd like to have the test code included right there in the file. Can I do that with pytest? * If I can, can I use code coverage on it? The example code discussed in the episode: script.py ``` def foo(): return 5 def main(): x = foo() print(x)...

146: Automation Tools for Web App and API Development and Maintenance - Michael Kennedy

February 28, 2021 23:00 - 48 minutes - 33.4 MB

Building any software, including web apps and APIs requires testing. There's automated testing, and there's manual testing. In between that is exploratory testing aided by automation tools. Michael Kennedy joins the show this week to share some of the tools he uses during development and maintenance. We talk about tools used for semi-automated exploratory testing. We also talk about some of the other tools and techniques he uses to keep Talk Python Training, Talk Python, and Python Bytes...

Guests

Kelsey Hightower
2 Episodes
April Wensel
1 Episode
Charity Majors
1 Episode
Kent Beck
1 Episode
Matt Harrison
1 Episode
Stephanie Hurlburt
1 Episode

Twitter Mentions

@brianokken 4 Episodes
@engineering 3 Episodes
@hjwp 1 Episode
@__mharrison__ 1 Episode
@martin_heroux 1 Episode
@kjam 1 Episode
@davehunt82 1 Episode
@sehurlburt 1 Episode
@bob_the_mighty 1 Episode
@nnja 1 Episode
@hackebrot 1 Episode
@brenankeller 1 Episode
@quinnypig 1 Episode
@codependentcodr 1 Episode
@tannewt 1 Episode
@obestwalter 1 Episode
@simonw 1 Episode
@webology 1 Episode
@holtbt 1 Episode
@karennjohnson 1 Episode