Search the archive

14,355 indexed articles, 13,283 of them summarised by us.

Articles
14,355
Research papers
91,965
Models priced
2,249
Providers
163

21 results for “pytest”

Newest and most relevant first

Five Guardrails That Limit the Damage an AI Agent Can Do

It is a tutorial showing developers five concrete safety mechanisms, typed arguments, tool allowlists, read-only SQLite, step caps, confirmed writes, that limit what an AI agent can do, though its scope is a beginner walkthrough, not production guidance.

This is the third part of a 'AI Agents for Beginners' tutorial series on Towards Data Science. It shows five safeguards that limit what an AI agent (software that acts on its own) can do: strict data validation, a list of allowed tools, a read-only database, a limit on steps, and human confirmation before writing changes. Five automated tests verify the safeguards in 0.68 seconds.

A Towards Data Science tutorial demonstrates five practical guardrails for AI agents: strict Pydantic argument validation, a tool allowlist, read-only SQLite access, a step cap, and confirmation before any write operation. Five pytest tests verify the setup in 0.68 seconds. It is educational content rather than a product release, and the article provides no cost, adoption, or benchmark information.

Part three of an AI Agents for Beginners series on Towards Data Science implements five guardrails: strict Pydantic argument schemas for tool calls, a tool allowlist, read-only SQLite access, a step cap, and confirmed writes. Five pytest tests validate the implementation in 0.68 seconds. The excerpt does not specify the agent framework, LLM used, or limits chosen.

Towards Data Science Blog →

If in doubt, delete the uv.lock file

Python developers on 3.15 can lose minutes to confusing dependency build failures that are fixed simply by deleting a stale uv.lock file.

Simon Willison shares a fix for a puzzling Python programming error. Python packages sometimes come with a 'lock' file that pins exact versions of other software they need. When those pinned versions lack pre-built files for the new Python 3.15, installing them fails. Deleting the lock file and rerunning usually solves it.

Willison, a prominent Python developer, documents an operational gotcha for teams upgrading to Python 3.15. Stale uv.lock files left by test runs can pin dependency versions without Python 3.15 support, causing build failures like maturin/Pyo3 errors. The remedy, delete the lock file, is cheap, but teams upgrading now should know it to avoid lost debugging time.

Libraries omit uv.lock (pinning dependencies would be rude to consumers), but `uv run pytest` generates one locally, gitignored. With Python 3.15, a pinned version like watchfiles==1.1.1 may lack a 3.15 wheel; maturin's build fails because Pyo3 caps supported Python at 3.14. Deleting the lock and rerunning `uv run pytest` resolves it.

Simon Willison’s Weblog →

alchemy-utils 0.1a0

Simon Willison's sqlite-utils CLI now has a database-agnostic SQLAlchemy-backed equivalent usable today against PostgreSQL, SQLite and DuckDB.

Simon Willison released the first test version (0.1a0) of a tool called alchemy-utils. It lets you work with databases using simple commands, just like his popular sqlite-utils tool, but it works with many kinds of databases instead of only one. He built most of it by asking OpenAI's Codex coding agent, using the model called GPT-5.6 Sol Ultra, in a single morning.

This is a niche developer tool release with no commercial stakes. Simon Willison shipped alchemy-utils 0.1a0, an alpha built largely by the Codex agent using GPT-5.6 Sol Ultra in one morning with few follow-up prompts. The practical signal for decision-makers is that agentic coding now produces a releasable, tested library prototype in hours. No pricing, adoption numbers or business impact are given.

alchemy-utils 0.1a0 ports sqlite-utils' core API (insert, upsert, insert_all, upsert_all, create, update, table introspection) onto SQLAlchemy for multi-engine support, tested against PostgreSQL, SQLite and DuckDB with pytest in red/green TDD. Installable via uvx with optional extras like alchemy-utils[postgresql] or [duckdb]. A CSV-to-DuckDB load of San Francisco's street tree list was slow (~1 hour) until Codex optimized it to ~35 seconds. Limitations: alpha release, no stated API stability.

Simon Willison’s Weblog →

Giskard v3: modular, async-first testing for agentic systems

Teams shipping LLM agents get a purpose-built async testing framework, making regression detection after prompt changes or model swaps practical instead of ad-hoc.

Giskard v3 is a free, open-source testing tool for AI agents, software that performs tasks by calling other services, not just chatting. You write scenarios like a customer asking for a refund, and it checks whether the agent's answers meet your rules. Version 3 splits everything into reusable, pluggable parts and works natively with asynchronous Python code. It matters to developers building agents that call APIs or handle user data.

Giskard v3 gives teams building AI agents a structured way to catch behaviour regressions, like an agent ignoring instructions after a prompt tweak or a model swap, before customers do. It is open source and free from the Giskard-AI GitHub repo, competing loosely with general test frameworks rather than dedicated agent QA products. It is deliberately narrow: no monitoring, no framework features, just scenario-based testing.

Giskard v3 is an async-first Python testing framework for agentic systems and LLM pipelines. Version 3 restructures the monolithic runner into composable components: pluggable agents, evaluators and data generators, with chained LLM-as-a-judge evaluators combined with deterministic checks (e.g. valid JSON output, no harmful content). Fixtures are written as native async def functions, matching LangGraph, CrewAI and asyncio pipelines. The article includes no benchmark figures or performance data; docs are at github.com/Giskard-AI/giskard.

GitHub Opensource Projects →

Qodo-Cover: AI-generated tests that actually increase your code coverage

Developers with low test coverage can now run an open-source CLI that generates only the tests that measurably raise coverage, saving hours of manual edge-case writing.

A company called CodiumAI released a free, open-source command-line tool called Qodo-Cover that writes software tests automatically. Unlike other AI test generators, it checks whether each new test actually increases 'code coverage', the measure of how much of a program's code is exercised by tests, and throws away tests that don't help. It works with Python, JavaScript, TypeScript and Java, and anyone can install it today. It won't replace manual testing, but it helps teams with neglected codebases catch gaps faster.

CodiumAI's open-source Qodo-Cover targets a persistent engineering cost: writing tests for untested branches and edge cases. It only accepts generated tests that verifiably raise coverage, so teams adopting coverage gates in CI pipelines can use it without adding noise. No pricing is discussed since the tool is free, though it requires a paid or local LLM API (OpenAI, Anthropic, or Ollama) to run. Competitors aren't named.

Qodo-Cover (repo: cover-agent) is a CLI supporting Python, JavaScript, TypeScript and Java with pytest, Jest and JUnit. It measures baseline coverage, generates tests targeting untested branches and paths, runs them, and discards any that don't increase coverage in a self-critique iteration loop. Generated tests follow existing naming conventions and are editable. Output quality varies and requires human review; no benchmark numbers are given.

GitHub Opensource Projects →

Your First Task as a Data Engineer in a New Company? Make the ETL Pipeline Testable

It argues new data engineers should make inherited ETL pipelines testable first, a practical claim but with no tools, code or benchmarks shown in the available text.

This is a how-to article for people starting a data engineering job, where they maintain the automated data pipelines that move information between systems. Its advice: instead of diving into features, your first project should be making the pipeline testable so changes can be verified automatically. It also covers setting up your development environment and using AI assistants while coding. No tools, code examples or company names are given in the available text.

A Towards Data Science tutorial proposes that a new data engineering hire's first task should be adding automated tests to the company's ETL pipeline (the software that extracts, transforms and loads data), alongside environment setup and AI-assisted development. For engineering managers this suggests onboarding plans that prioritise testability. The abstract provides no specific tools, costs, timelines or case-study results.

The article walks through an onboarding workflow for data engineers: environment setup, retrofitting automated tests onto an existing ETL pipeline, and integrating AI-assisted development into that process. The mechanism and architecture are not described in the available text, no testing frameworks (e.g. pytest, dbt tests), orchestration tools, or code snippets are named. No benchmarks, versions or dates are given; treat it as guidance rather than a replicable recipe.

Towards Data Science Blog →

asyncinject 0.7

Very little changes; this is a minor Python library release whose notable detail is that an AI model found and fixed its bugs.

Simon Willison released version 0.7 of asyncinject, a small Python library that runs asynchronous tasks using a dependency-injection style similar to pytest fixtures. The release matters mainly because Claude Fable 5, an AI model, found bugs in the code and fixed them itself. The article does not describe what changed in 0.7, offer benchmarks, or list fixes.

This is a routine version bump of a niche Python utility, asyncinject 0.7, not a strategic event. The only substantive detail is that Willison's AI model, Claude Fable 5, proactively found and fixed bugs in the code. There is no pricing, adoption, competitive or risk information in the article, so there is no decision to make here.

asyncinject is Willison's Python library for running asyncio workflows via dependency injection in a pytest-fixtures style, built originally to support Datasette. Version 0.7 exists, but the article does not enumerate changes. The notable detail: Claude Fable 5 identified bugs in the dependency and applied fixes, described as a 'very proactive model'. No benchmark or changelog specifics are given.

Simon Willison’s Weblog →

datasette 1.0a28

Plugin authors should upgrade because 1.0a28 fixes breakages 1.0a27 introduced, including callback errors and file descriptor leaks in test suites.

Datasette is a free, open-source tool for publishing and exploring databases online. Its developer, Simon Willison, released version 1.0a28 to fix problems he accidentally introduced in the previous test version, 1.0a27. The fixes repair broken code hooks, make cleanup easier, and prevent new tests from exhausting system resources. Most of the fixing was done using Claude's AI coding assistant.

Datasette maintainer Simon Willison shipped alpha 1.0a28 to repair regressions found while upgrading Datasette Cloud to 1.0a27. Risk falls on plugin developers: a broken callback signature is fixed, and new close() methods plus a pytest plugin prevent file-descriptor exhaustion in test suites. Anyone running plugins against the 1.0 alpha line should upgrade now. Most fixes were written with Claude Opus 4.7.

Datasette 1.0a28 fixes execute_write_fn() callbacks whose parameter is not named conn, broken in 1.0a27 (issue #2691). database.close() now shuts down the write connection, and a new datasette.close() (#2693) tears down all resources on server shutdown. A built-in pytest plugin auto-closes instances in function-scoped fixtures, avoiding file-descriptor exhaustion in suites predating the Database(is_temp_disk=True) feature from 1.0a27 (issue #2692). Changes were largely implemented with Claude Code and Claude Opus 4.7.

Simon Willison’s Weblog →

My fireside chat about agentic engineering at the Pragmatic Summit

Simon Willison's practices, red-green TDD, templates, sandboxing, trusting Opus 4.5 output, give working developers a concrete playbook for safely delegating more code to agents.

Simon Willison spoke at the Pragmatic Summit about how he works with AI coding agents, programs that write code for developers. He says he started letting the AI write most of his code only six months ago, and that Anthropic's Opus 4.5 was the first model he trusts without reading every line. He recommends asking agents to write tests first and says tests are now 'effectively free' and no longer optional. The talk also covers security risks like prompt injection, where tricked AI systems leak private data.

This fireside chat from the Pragmatic Summit offers a benchmark for how experienced engineering teams should run AI coding agents. Willison's core claims: tests are no longer optional because agents can write them cheaply, code quality only matters for long-term maintained projects, and sandboxing is the main safety control since agents can be manipulated via prompt injection. Companies adopting a 'nobody reads the code' approach, like security firm StrongDM, draw his criticism as irresponsible. Teams ignoring these practices risk shipping unverified, insecure code.

Willison describes running every agent session with 'uv run pytest' and a five-token instruction to use red-green TDD, dramatically improving code correctness. He endorses conformance-driven development: for Datasette file uploads, he had Claude build a test suite passing on Go, Node.js, Django and Starlette, then implemented against it. He introduces Showboat, a tool generating markdown records of manual curl-based API testing agents perform. On security he explains the 'lethal trifecta': private data access, exposure to malicious instructions, and an exfiltration vector.

Simon Willison’s Weblog →

First run the tests

A four-word prompt, 'first run the tests', has become a practical discipline for keeping AI-generated code from breaking in production.

Simon Willison argues that automated tests, small programs that check whether software works, are essential when using AI coding agents like Claude Code, because untested AI code often fails when deployed. He starts every agent session with the prompt 'First run the tests,' which makes the agent locate and run the existing test suite. This also teaches the agent about the codebase and pushes it to write its own tests. No benchmarks or product details are given.

Willison's guidance addresses the main risk of AI-assisted development: code that was never executed may not work in production. His remedy costs little, instructing agents like Claude Code to run existing tests at the start of every session. Teams without test suites lose a key safeguard and a way for agents to learn their codebase. The article is opinion and practice, not a product announcement or pricing news.

Willison recommends starting every coding-agent session with 'First run the tests' or, for his Python projects, 'Run "uv run pytest"' via pyproject.toml dependency groups. The prompt forces the agent to discover the test harness, which reveals project size and complexity, biases it toward testing its own changes, and exposes it to tests as codebase documentation. It complements his red/green TDD pattern. No benchmarks, metrics, or limitations are provided.

Simon Willison’s Weblog →

Datasette 1.0a24

Datasette developers can now handle multipart file uploads and run tests with uv without manual setup, but the 1.0 release remains an alpha.

Datasette, an open-source tool for publishing and exploring data files, has released version 1.0a24, its 24th alpha release ahead of a final 1.0 version. This update lets software plugins accept uploaded files, uses the uv tool so contributors can run tests with one command, and adds a JSON option to render custom-styled cells. It matters mainly to the developers who build on Datasette.

Datasette 1.0a24 is an alpha build of a long-promised 1.0 release, aimed squarely at developers rather than buyers. Its practical gains: plugins can now accept file uploads, a new JavaScript-rendering parameter enables richer UIs, and onboarding for contributors got easier via uv. Anyone deciding when to adopt Datasette 1.0 in production should wait for a stable release; no timeline is given.

Datasette 1.0a24 adds multipart/form-data file upload support via await request.form(files=True) on the Request object, plus a ?_extra=render_cell parameter on table and row JSON endpoints exposing the render_cell() plugin hook output. The dev environment now uses uv with dev dependency groups, so a fresh clone runs uv run pytest without manual virtualenv setup. Simon Willison also eliminated intermittently failing CI tests.

Simon Willison’s Weblog →

Tips for getting coding agents to write good Python tests

Developers using coding agents can directly apply Simon Willison's concrete prompting tactics to get higher-quality Python test suites with less manual cleanup.

Simon Willison, a well-known programmer and writer, shared tips on his blog for getting AI coding assistants like Claude to write good Python tests. His main advice: name specific tools such as pytest-httpx for mocking network calls, and work in a project that already has a clean test suite, because the AI copies existing patterns. He also recommends pointing the agent at an example repository, like his datasette-enrichments project on GitHub, so it can imitate the testing style.

Willison's post argues that AI-written test quality depends mostly on project hygiene rather than clever prompting: agents mirror the patterns already in your codebase. Teams adopting AI coding tools should invest in clean, well-patterned pytest suites before delegating test writing, since duplicated setup code is the main anti-pattern to police. No costs, benchmarks or timelines are given; the value is practical workflow guidance for engineering leads.

Willison works in Python because pytest is heavily represented in model training data, so Claude reliably knows commands like 'use pytest-httpx to mock the endpoints' or 'refactor to pytest.mark.parametrize' and 'extract common setup into a fixture'. The main anti-pattern he flags is duplicated test setup code, which he tolerates less in implementation than tests. His strongest tactic is pasting a prompt telling the agent to clone a reference repo, e.g. datasette/datasette-enrichments, to /tmp and imitate its testing patterns.

Simon Willison’s Weblog →

LLM 0.28

Developers using the LLM CLI can now call OpenAI's gpt-5.1 and gpt-5.2 models and set up the dev environment with a single 'uv run pytest' command.

Simon Willison released version 0.28 of LLM, a free command-line tool and Python library for chatting with AI models. This update adds support for OpenAI's newest models, gpt-5.1 and gpt-5.2, and fixes small bugs like a leak of file handles. It also makes it easier for volunteer programmers to set up and run the project's tests. People who build software with AI models are the ones affected.

LLM, Simon Willison's open-source Python library and CLI for working with large language models, shipped version 0.28. The practical impact for teams is added support for OpenAI's gpt-5.1 and gpt-5.2 models through a single tool. Contributor onboarding also gets cheaper: the project now uses 'uv' with dependency groups, so cloning the repo and running 'uv run pytest' suffices. No cost, risk or competitive implications are stated.

LLM 0.28 adds model IDs gpt-5.1, gpt-5.1-chat-latest, gpt-5.2 and gpt-5.2-chat-latest for OpenAI. The '-f URL' fragment fetcher now sends a 'llm/VERSION (https://llm.datasette.io/)' user-agent header, and a bug registering fragments with their source in 'llm chat' is fixed (PR #1316). Type annotations were added to OpenAI Chat, AsyncChat and Completion execute() methods, and dev setup moved to uv dependency groups in pyproject.toml.

Simon Willison’s Weblog →

TIL: Subtests in pytest 9.0.0+

pytest 9.0.0's new subtests give Python developers a faster, more flexible alternative to @pytest.mark.parametrize, changing how parameterized tests can be written.

pytest, a popular tool for testing Python code, added a feature called subtests in version 9.0.0, released November 5, 2025. Instead of writing one test that repeats with different inputs using the old 'parametrize' decorator, developers can now loop inside the test and check each case separately. This is marginally faster and lets tests be built dynamically after setup code runs.

pytest 9.0.0 shipped on November 5, 2025 with a subtests feature as an alternative to the widely used parametrize decorator. Willison reports it runs faster and allows test cases to be generated after setup code executes. Teams doing Python testing could cut test runtime slightly, though nothing breaks immediately; adoption is optional. He used Claude Code to port Datasette tests to the new pattern.

pytest 9.0.0 (released 2025-11-05) introduces subtests via a 'subtests' fixture: wrap assertions in 'with subtests.test()' to get per-case pass/fail reporting. Willison shows a @pytest.mark.parametrize test over app.SETTINGS rewritten as a for-loop with subtests.test(setting=setting.name). Benefits cited: slightly faster execution and programmatic creation of subtests after setup code. He had Claude Code port several Datasette tests (PR #2609) to the pattern.

Simon Willison’s Weblog →

TIL: Dependency groups and uv run

Python developers can now clone a project and run its tests with a single 'uv run pytest' command, removing manual virtualenv and dependency setup steps.

Simon Willison published a short guide (a 'TIL' post) explaining a trick for Python projects using uv, a tool that manages Python packages. By declaring a 'dev' dependency group containing pytest in pyproject.toml, anyone who clones a project can run 'uv run pytest' and the test tool installs and runs automatically. He demonstrated it on his datasette-extract project, and also used Claude Code to build a redirects plugin for his TIL site.

Willison documents a project setup pattern using uv and PEP 735 dependency groups that cuts onboarding to three commands: clone, cd, and 'uv run pytest'. This reduces friction for contributors to his open-source projects like datasette-extract. He also shipped a small plugin, datasette-redirects, built with Claude Code, to handle URL redirects after reorganising his TIL site. The cost is minimal; the benefit is faster developer onboarding.

The pattern declares a dev dependency group under PEP 735 in pyproject.toml, [dependency-groups] dev = ["pytest"], so 'uv run pytest' auto-creates a virtual environment, installs the group, and executes tests. No manual 'uv sync' or activation is needed. Willison also reorganised his uv TILs into a subfolder, requiring a datasette-redirects plugin for old-path redirects and a build-script change to preserve file creation dates.

Simon Willison’s Weblog →

Video + notes on upgrading a Datasette plugin for the latest 1.0 alpha, with help from uv and OpenAI Codex CLI

Plugin developers maintaining Datasette extensions get a repeatable recipe, uv-sandboxed tests plus a Codex CLI one-liner, for handling the 1.0a20 permission API break.

Simon Willison published a video plus notes showing how he upgraded one of his small add-ons, called datasette-checkbox, to work with a new test version of his data-exploration tool, Datasette. The new version broke an old permission-checking method, causing errors. He used free tools that run code in isolated spaces to reproduce the bug, then let OpenAI's coding agent, Codex, fix the code automatically. The finished update, version 0.1a4, is now available on the public Python package index, PyPI.

This is a practical walkthrough, not a product launch: Datasette 1.0a20 renamed the permission API, breaking older plugins. Willison shows a cheap workflow, run tests in disposable uv environments, then hand the failing test suite to OpenAI Codex CLI in non-interactive mode with a reference document and let it loop until tests pass. Teams maintaining many plugins could apply this to cut upgrade effort; the shipped result is datasette-checkbox 0.1a4 on PyPI.

Datasette 1.0a20 removed Datasette.permission_allowed(), so plugins using it 500-error. Willison's 'tadd' shell script runs pytest in an isolated uv environment installing the plugin as editable plus ~/dev/datasette; his tests were too weak to catch the failure until updated to assert a 200 on the table page. The fix was applied by 'codex exec --dangerously-bypass-approvals-and-sandbox' told to read the upgrade docs and make tadd pass. He verified the shipped 0.1a4 release with 'uvx --prerelease=allow'.

Simon Willison’s Weblog →

Setting up a codebase for working with coding agents

Willison's practical checklist tells developers that tests, linting and issue trackers, not documentation, are what make codebases work well with AI coding agents.

Simon Willison, a well-known programmer and writer, answered a question on Hacker News about preparing a codebase for AI coding tools like Claude Code. His advice: write lots of automated tests (his project has 1,500), let the AI run them, and provide linters and type checkers the tools can use. He argues documentation matters little because AI reads code faster than humans, and what helps human maintainers helps AI too.

Willison's advice for teams adopting AI coding agents is practical: invest in automated test suites, he cites a project with 1,500 pytest tests that Claude Code runs selectively, plus linters, type checkers and dev-server instructions for interactive testing. Notably, documentation is low priority since agents read code directly. Teams with strong engineering hygiene gain the most; no costs, timelines or products are announced.

Willison recommends pytest suites agents can selectively run, one project has 1,500 tests, with Claude Code running relevant subsets then the full suite, plus Playwright or curl against a dev server for interactive verification. He suggests pasting GitHub issue URLs directly into Claude Code and providing linters, type checkers and auto-formatters. Documentation is de-emphasised because LLMs parse code directly; no benchmarks or limitations are given.

Simon Willison’s Weblog →

TIL: Testing different Python versions with uv with-editable and uv-test

Python developers get a one-line uv command to run pytest against any Python version, which matters right now for Python 3.14 upgrades.

Simon Willison shares a command-line recipe for testing a Python project against different versions of Python, such as 3.14 or 3.11. It uses uv, a tool for managing Python environments, to run pytest (a testing program) in an isolated copy of the project. This helps developers confirm their code works across Python versions, which he did while upgrading projects for Python 3.14.

Teams preparing for Python 3.14 releases get a practical shortcut: a single uv command runs a project's test suite against any Python version from one directory. Willison packaged it into a shell script, uv-test, accepting a version flag like -p 3.11 and pytest options. The cost is adoption of uv and a pyproject.toml defining a 'test' extra; setups relying only on setup.py are also supported.

Willison's recipe is 'uv run --python 3.14 --isolated --with-editable .[test] pytest'. The --with-editable flag installs the project itself in editable mode so local changes are picked up by subsequent runs; --isolated prevents other environments from influencing the run. It works in any directory with a pyproject.toml or setup.py that defines a 'test' extra using pytest. He wrapped it in a uv-test script supporting version flags and pytest options like -k permissions.

Simon Willison’s Weblog →

Claude can write complete Datasette plugins now

Claude Sonnet 4.5 shipped a complete, tested, published open-source plugin end-to-end, showing single-prompt agentic coding can now deliver finished small software projects.

Simon Willison used Anthropic's Claude Sonnet 4.5 AI, via the Claude Code tool, to write an entire software plugin called datasette-os-info. The plugin adds a web page that reports details about the computer's operating system, like the Linux version it runs on. Every line of code and test was written by the AI from a single instruction, and it even found and fixed its own bug. The finished plugin is free and published on the PyPI package site.

Willison reports the first Datasette plugin he has shipped where Claude Sonnet 4.5 wrote all code and tests with minimal prompting, using Claude Code in unrestricted 'YOLO' mode. The plugin is live on PyPI as datasette-os-info 0.1. This signals that agentic coding tools can now deliver complete, deployable small projects, not just snippets, a productivity gain for developer teams, though the AI itself flagged that the output endpoint exposes sensitive system information without authentication.

Willison scaffolded datasette-os-info from his cookiecutter template, then prompted Claude Code (claude --dangerously-skip-permissions) to implement a /-/os JSON route via Datasette's register_routes() hook. Claude wrote the implementation and tests unprompted, ran pytest, found and fixed its own invented Response(default_repr=) bug. Built with uv and python -m build, deployed via datasette publish, released on PyPI with GitHub Actions Trusted Publishing. The plugin reports platform, os-release, kernel, memory and environment data; Claude flagged hostname and PATH as sensitive.

Simon Willison’s Weblog →

Hypothesis is now thread-safe

Python teams running Hypothesis tests can now execute them in parallel threads, removing one blocker for testing packages against the free-threaded Python build.

Hypothesis is a popular Python testing tool that automatically invents thousands of odd test inputs, like strange lists of numbers, to catch bugs developers would miss. Until now it couldn't safely run multiple tests at the same time in parallel. Python is preparing to remove a long-standing bottleneck (its 'GIL') so programs can truly run in parallel, and packages now need parallel testing. Hypothesis contributor Liam DeVoe, funded by Quansight, made the tool safe for this.

Python's move to free threading (removing its global interpreter lock, per PEP 703) requires libraries to prove thread safety, but Hypothesis tests were being skipped in those runs, cutting test coverage across many packages. Quansight sponsored contributor Liam DeVoe to fix this, so that coverage gap is now closed. Any Python team planning free-threaded migration benefits immediately; there are no costs or benchmarks stated.

Hypothesis, the property-based Python testing library (e.g. @given(st.lists(st.integers()))), is now thread-safe, thanks to contributor Liam DeVoe with Quansight sponsorship. Previously tests had to run sequentially, and community packages skipped Hypothesis suites under the free-threaded build (PEP 703), losing substantial coverage. Running tests in two or more concurrent threads is now viable. The article gives no implementation details, version number or performance figures.

Simon Willison’s Weblog →

Automated Testing: A Software Engineering Concept Data Scientists Must Know To Succeed

Data scientists who keep production pipelines in untested notebooks risk silent breakage; applying software engineering tests catches failures before they hit models or stakeholders.

This is a tutorial-style article arguing that data scientists should adopt automated testing, a software engineering practice where code automatically checks itself for errors every time it runs. The author describes a common failure mode: data scientists write code in Jupyter Notebooks, an interactive tool for mixing code and results, test it once when first written, and then leave it unattended. No specific tools, code examples, or case study details appear in the excerpt.

The article warns that teams relying on untested notebook code for data processing and model training face pipelines that silently break over time, producing bad models or wrong decisions. It advocates borrowing automated testing practices from software engineering to catch failures early. No costs, timelines, or organizational case data are provided in the excerpt.

The piece makes the case that data scientists should apply software engineering testing practices, unit tests, regression checks, to notebook-based data processing and model training pipelines, which are typically tested once at authoring and then neglected. It targets the Jupyter Notebook pattern of maintaining entire pipelines in cells. The excerpt omits concrete tooling (pytest, CI/CD pipelines), code examples, and any benchmarks or metrics.

Towards Data Science Blog →