testing

12 posts tagged “testing”.

  1. 2026
  2. The Check That Cannot Fail and 9 Rules for Real Verification

    Have you ever looked at a dashboard full of passing tests and felt a sudden wave of suspicion? You probably should.

    3 min read
  3. 2025
  4. Checking if something is callable or async callable in Python

    I wanted a mechanism to check if a given Python object was "callable" - could be called like a function - or "async callable" - could be called using .

    1 min read
  5. Asserting a dictionary is a subset of another dictionary

    Take for example an API endpoint that returns something like this: I want to efficiently assert against the second two keys, but I don't want to hard-code the SQLite version into my test in case it…

    1 min read
  6. axe-core and shot-scraper for accessibility audits

    I just watched a talk by Pamela Fox at North Bay Python on Automated accessibility audits. The video should be up within 24 hours.

    1 min read
  7. How to mock httpx using pytest-mock

    I wrote this test to exercise some httpx code today, using pytest-mock. The key was to use which patches the module that was imported by the module.

    1 min read
  8. Async fixtures with pytest-asyncio

    I wanted to use a fixture with that was itsef as function, so that it could execute statements. Since I'm using a file containing I had to use the fixture to get this to work.

    1 min read
  9. 2024
  10. Getting Python MD5 to work with FIPS systems

    This issue by Parand Darugar pointed out that Datasette doesn't currently run on Linux systems with FIPS enabled, due to the way it uses MD5 hashes. I hadn't heard of FIPS before.

    2 min read
  11. Emulating a big-endian s390x with QEMU

    I got a bug report concerning my sqlite-fts4 project running on PPC64 and s390x architectures. The s390x is an IBM mainframe architecture, which I found glamorous!

    1 min read
  12. 2023
  13. Generating documentation from tests using files-to-prompt and LLM

    I was experimenting with wasmtime-py today and found the current documentation didn't quite give me the information that I needed.

    2 min read
  14. How to call pip programatically from Python

    I needed this for the and commands, see issue 925. My initial attempt at this resulted in weird testing errors ( 928) - while investigating them I stumbled across this comment in the source code: So I…

    1 min read
  15. Code coverage using pytest and codecov.io

    I got my asgi-csrf Python package up to 100% code coverage. Here's the pull request. I started by installing and using the pytest-cov pytest plugin.

    1 min read
  16. A tip for debugging pytest-httpx

    I use pytest-httpx in a bunch of my projects. Occasionally I run into test failures like this one, which can sometimes be really hard to figure out: Today I figured out a pattern for investigating…

    1 min read