Unravelling t-strings with pytest
Brett Cannon recently released an article explaining Python 3.14's new t-strings. This article has pytest versions of the code from Brett's article.
A collection of 58 Posts
Brett Cannon recently released an article explaining Python 3.14's new t-strings. This article has pytest versions of the code from Brett's article.
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. I'm expanding on that with some pytest code to test the different ways.
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.
Recapping some troubles I had when upgrading
Slides, link to video, and resources
A discussion of some ideas around Lean TDD from 2022. 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][testandcode] a few times and even tried to do a quick outline at the end of [episode 162][flavors]. This post is a more complete outline, or at least a first draft.
I’ve made a few changes to the pytest-expect fixture plugin.
This is the first iteration that implements ’expect’ as a fixture.
This is really the third attempt at an ’expect()’ implementation that …
Occasionally referred to as Test First Development, Test First Programming is a beautiful concept that radically changed the way I approach software …
In Delayed assert / multiple failures per test, I presented a first attempt at writing an ’expect()’ function that will allow
a test function to …
A test stops execution once it hits a failing assert statement.
That’s kinda the point of an assert statement, though, so that’s not surprising. …
Yes. pytest handles unittest fixtures fine
Exactly what happens to the flow of your test code when an exception is thrown in a fixture function.
I think of pytest as the run-anything, no boilerplate, no required api, use-this-unless-you-have-a-reason-not-to test framework.
This is really where testing …
The unittest test framework is python’s xUnit style framework.
It is a standard module that you already have if you’ve got python version 2.1 or greater.
In …
The doctest test framework is a python module that comes prepackaged with Python. This post covers the basics of how to put doctests in your code, and outside …
While writing software, we are faced with lots and lots of interfaces.
The public interface for some tool or module or package or whatever is usually referred …
To explore the concepts of functional testing using python and python testing frameworks, I’m building a project to test, markdown.py on github.
In this post, …
I’ve decided to write my own Markdown script,
possibly for dubious reasons.
I’m getting antsy to code.
But before I get started on the testing and …
Markdown has very little to do with python testing.
But I need a project to test, so I’m writing my own Markdown script.
This is a brief introduction to …