# Pytest

Published articles for Pytest.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## An RTOS for Ages Two and Up -- Zephyr Podcast #049

DevFeed: [An RTOS for Ages Two and Up -- Zephyr Podcast #049](<https://devfeed.tech/articles/an-rtos-for-ages-two-and-up-zephyr-podcast-049-38673.md>)

Original publisher: [Read original article](<https://zephyrproject.org/an-rtos-for-ages-two-and-up-zephyr-podcast-049/>)

Author: Benjamin Cabé

Published: 2026-09-04T20:01:01Z

Content type: article

Language: en

Sources: [Zephyr Project](<https://devfeed.tech/sources/zephyr-project-2.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Python](<https://devfeed.tech/topics/python.md>), [Arduino](<https://devfeed.tech/topics/arduino.md>), [Embedded Software Dev](<https://devfeed.tech/topics/embedded-software-dev.md>), [Hardware](<https://devfeed.tech/topics/hardware.md>), [Robotics](<https://devfeed.tech/topics/robotics.md>)

Tags: [arduino](<https://devfeed.tech/tags/arduino.md>), [blog](<https://devfeed.tech/tags/blog.md>), [firmware](<https://devfeed.tech/tags/firmware.md>), [github](<https://devfeed.tech/tags/github.md>), [halow](<https://devfeed.tech/tags/halow.md>), [hardware](<https://devfeed.tech/tags/hardware.md>), [podcast](<https://devfeed.tech/tags/podcast.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [robotics](<https://devfeed.tech/tags/robotics.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [zephyr](<https://devfeed.tech/tags/zephyr.md>)

### AI overview

Zephyr Podcast #049 covers hardware-in-the-loop testing with the pytest harness in Twister, Arduino Core for Zephyr reaching 1.0, recent project contributions, new drivers and shell features, Wi-Fi HaLow support, and Zephyr robotics activities.

### Source excerpt

The Dato DUO and the Teenage Engineering catalogue: lovely open-firmware noise machines that do not run Zephyr ...yet! Using the pytest harness in Twister to coordinate a device under test...

## Testing Infrastructure Code by Executing Its Real Expressions

DevFeed: [Testing Infrastructure Code by Executing Its Real Expressions](<https://devfeed.tech/articles/testing-infrastructure-code-by-executing-its-real-expressions-34115.md>)

Original publisher: [Read original article](<https://philipptheserver.com/posts/testing-real-expressions/>)

Author: Philipp Lehmann (philipp.lehmann@gruppe.ai)

Published: 2026-08-28T07:00:00Z

Content type: tutorial

Language: en

Sources: [Philipp Lehmann](<https://devfeed.tech/sources/philipp-lehmann.md>)

Topics: [Ansible](<https://devfeed.tech/topics/ansible.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Pytest](<https://devfeed.tech/topics/pytest.md>), [Ansible Roles](<https://devfeed.tech/topics/ansible-role.md>)

Tags: [ansible](<https://devfeed.tech/tags/ansible.md>), [ci-cd](<https://devfeed.tech/tags/ci-cd.md>), [code](<https://devfeed.tech/tags/code.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [infrastructure-as-code](<https://devfeed.tech/tags/infrastructure-as-code.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

This article explains how to test Ansible infrastructure code by rendering the shipped Jinja expression through Ansible's actual templating machinery. It recommends extracting the expression from the role file, using realistic fixture variables, and asserting on the rendered result instead of duplicating the computation in Python.

### Source excerpt

Ansible Templar in pytest: render the shipped combine(recursive=True) expression from defaults/main.yml instead of a shallow Python paraphrase.

## Keeping Documentation Honest with an OpenAPI Snapshot Diff

DevFeed: [Keeping Documentation Honest with an OpenAPI Snapshot Diff](<https://devfeed.tech/articles/keeping-documentation-honest-with-an-openapi-snapshot-diff-34111.md>)

Original publisher: [Read original article](<https://philipptheserver.com/posts/openapi-docs-contract-test/>)

Author: Philipp Lehmann (philipp.lehmann@gruppe.ai)

Published: 2026-08-25T07:00:00Z

Content type: tutorial

Language: en

Sources: [Philipp Lehmann](<https://devfeed.tech/sources/philipp-lehmann.md>)

Topics: [OpenAPI Specification](<https://devfeed.tech/topics/openapi.md>), [FastAPI](<https://devfeed.tech/topics/fastapi.md>), [ci](<https://devfeed.tech/topics/ci.md>), [Pytest](<https://devfeed.tech/topics/pytest.md>), [Documentation](<https://devfeed.tech/topics/documentation.md>), [JSON](<https://devfeed.tech/topics/json.md>), [test](<https://devfeed.tech/topics/test.md>)

Tags: [api-documentation](<https://devfeed.tech/tags/api-documentation.md>), [ci](<https://devfeed.tech/tags/ci.md>), [ci-cd](<https://devfeed.tech/tags/ci-cd.md>), [documentation](<https://devfeed.tech/tags/documentation.md>), [fastapi](<https://devfeed.tech/tags/fastapi.md>), [json](<https://devfeed.tech/tags/json.md>), [openapi](<https://devfeed.tech/tags/openapi.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

The article explains how to keep API documentation aligned with a FastAPI application by generating its OpenAPI schema from the running code, comparing it with a committed snapshot in CI, normalizing the JSON diff, and requiring deliberate snapshot regeneration.

### Source excerpt

FastAPI app.openapi() snapshot test in pytest: fail CI when the live OpenAPI schema drifts from the committed openapi.snapshot.json.

## Testing an Agent Harness Without Ever Calling the Model

DevFeed: [Testing an Agent Harness Without Ever Calling the Model](<https://devfeed.tech/articles/testing-an-agent-harness-without-ever-calling-the-model-34114.md>)

Original publisher: [Read original article](<https://philipptheserver.com/posts/testing-an-agent-harness/>)

Author: Philipp Lehmann (philipp.lehmann@gruppe.ai)

Published: 2026-07-31T07:00:00Z

Content type: tutorial

Language: en

Sources: [Philipp Lehmann](<https://devfeed.tech/sources/philipp-lehmann.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Agent Harness](<https://devfeed.tech/topics/agent-harness.md>), [Pytest](<https://devfeed.tech/topics/pytest.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [coding](<https://devfeed.tech/topics/coding.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [agent-harness](<https://devfeed.tech/tags/agent-harness.md>), [agents](<https://devfeed.tech/tags/agents.md>), [api](<https://devfeed.tech/tags/api.md>), [network](<https://devfeed.tech/tags/network.md>), [permission](<https://devfeed.tech/tags/permission.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [python](<https://devfeed.tech/tags/python.md>), [recording](<https://devfeed.tech/tags/recording.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>)

### AI overview

This tutorial explains how to unit test a coding agent's tool-call permission layer without calling a model. It recommends separating the decision function from model responses, using recorded real-request fixtures, and keeping the policy module independent of any LLM SDK.

### Source excerpt

Unit testing a coding agent's tool-call permission layer with pytest and recorded fixtures: allow, deny or ask decisions with no model or API key.

## How to Test Infrastructure as Code

DevFeed: [How to Test Infrastructure as Code](<https://devfeed.tech/articles/how-to-test-infrastructure-as-code-19005.md>)

Original publisher: [Read original article](<https://www.pulumi.com/blog/how-to-test-infrastructure-as-code/>)

Author: Alex Leventer

Published: 2026-06-30T21:00:00Z

Content type: tutorial

Language: en

Sources: [Pulumi](<https://devfeed.tech/sources/pulumi.md>)

Topics: [Infrastructure as code](<https://devfeed.tech/topics/infrastructure-as-code.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Security](<https://devfeed.tech/topics/security.md>)

Tags: [how-to](<https://devfeed.tech/tags/how-to.md>), [iac](<https://devfeed.tech/tags/iac.md>), [infrastructure-as-code](<https://devfeed.tech/tags/infrastructure-as-code.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [security](<https://devfeed.tech/tags/security.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

This guide explains how to test infrastructure as code using unit tests with mocked cloud providers, integration tests against real resources, and policy checks. It shows how these testing layers can catch misconfigurations, security issues, drift, and regressions before infrastructure changes reach production.

### Source excerpt

IaC testing means validating your infrastructure code the same way you test application software--unit tests with mocked cloud providers that run in milliseconds, integration tests that deploy and inspect real resources, and policy checks that enforce compliance rules on every preview and deploy. Together, these layers catch misconfigurations before they reach production. Untested infrastructure code is a liability. A missing tag in a security group rule, an S3 bucket with public read access, a misconfigured IAM policy--any of these can slip through code review and land in production. Infrastructure bugs are often harder to debug than application bugs, because the feedback loop is slow (deploy, observe, destroy) and the blast radius is large (an outage, a security incident, a surprise AWS bill). The good news: Pulumi is built on general-purpose programming languages, which means you can test infrastructure code with the exact same tools and frameworks you already use to test application code. No new language to learn. No separate toolchain. Just pytest, Mocha, or go test--pointing at your infrastructure program. This guide walks through all three testing layers with complete, runnable examples. Why should you test infrastructure as code? The case for testing application code is well-established. The case for testing IaC is just as strong--arguably stronger, because the consequences of an undetected bug are more severe. Catch misconfigurations before they deploy. A unit test that checks whether a security group allows SSH from 0.0.0.0/0 will catch that misconfiguration in milliseconds, before any cloud API call is made. The same test in CI catches it before the code is merged. Prevent drift and outages. Integration tests that deploy to a staging environment and validate runtime behavior--does the HTTP endpoint return 200? does the database accept connections?--give you confidence that an infrastructure change doesn't silently break a dependent service. Refactor safely. Wel

## SwiNOG 41: It Was Nice to Be Back

DevFeed: [SwiNOG 41: It Was Nice to Be Back](<https://devfeed.tech/articles/swinog-41-it-was-nice-to-be-back-11387.md>)

Original publisher: [Read original article](<https://blog.ipspace.net/2026/05/swinog-41/>)

Published: 2026-05-04T05:09:00Z

Content type: opinion

Language: en

Sources: [ipSpace.net blog](<https://devfeed.tech/sources/ipspace-net-blog.md>)

Topics: [networking](<https://devfeed.tech/topics/networking.md>), [evpn](<https://devfeed.tech/topics/evpn.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Automation](<https://devfeed.tech/topics/automation.md>), [Testing](<https://devfeed.tech/topics/testing.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [conferences](<https://devfeed.tech/tags/conferences.md>), [e2e-testing](<https://devfeed.tech/tags/e2e-testing.md>), [evpn](<https://devfeed.tech/tags/evpn.md>), [llms](<https://devfeed.tech/tags/llms.md>), [network-automation](<https://devfeed.tech/tags/network-automation.md>), [networking](<https://devfeed.tech/tags/networking.md>), [pytest](<https://devfeed.tech/tags/pytest.md>)

### AI overview

A personal recap of SwiNOG 41 in Switzerland, highlighting discussions and presentations on networking topics including transceiver power, shared spectrum, AI and LLMs in networking, EVPN gateways, network automation, and end-to-end testing with Netlab and pytest.

### Source excerpt

Last week's SwiNOG was (as expected) great fun at a phenomenal location, starting with the first slide of the first presentation: "6 Stages of Network De-sh*tification". I particularly loved the "talk less, chat more" schedule. The longer breaks gave us plenty of time to catch up with old friends and discuss interesting, sometimes completely unexpected, topics. For example, I learned that SIP MESSAGE is used to carry SMS messages these days. As much as I loved chatting with fellow networking engineers, I also found these presentations highly interesting: Read more ...

## Python in Visual Studio Code - October 2025 Release

DevFeed: [Python in Visual Studio Code - October 2025 Release](<https://devfeed.tech/articles/python-in-visual-studio-code-october-2025-release-20353.md>)

Original publisher: [Read original article](<https://devblogs.microsoft.com/python/python-in-visual-studio-code-october-2025-release/>)

Author: Luciana Abud

Published: 2025-10-10T17:55:26Z

Content type: release

Language: en

Sources: [Microsoft Python Engineering](<https://devfeed.tech/sources/microsoft-python-engineering.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Visual Studio Code](<https://devfeed.tech/topics/visual-studio-code.md>), [releases](<https://devfeed.tech/topics/releases.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Pytest](<https://devfeed.tech/topics/pytest.md>), [.NET 11](<https://devfeed.tech/topics/net-11.md>), [Windows Subsystem for Linux](<https://devfeed.tech/topics/wsl.md>), [GitHub Copilot](<https://devfeed.tech/topics/github-copilot.md>), [jupyter](<https://devfeed.tech/topics/jupyter.md>)

Tags: [2025](<https://devfeed.tech/tags/2025.md>), [github-copilot](<https://devfeed.tech/tags/github-copilot.md>), [powershell](<https://devfeed.tech/tags/powershell.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [python](<https://devfeed.tech/tags/python.md>), [release](<https://devfeed.tech/tags/release.md>), [releases](<https://devfeed.tech/tags/releases.md>), [testing](<https://devfeed.tech/tags/testing.md>), [visual-studio-code](<https://devfeed.tech/tags/visual-studio-code.md>), [wsl](<https://devfeed.tech/tags/wsl.md>)

### AI overview

Microsoft announces the October 2025 release of the Python extensions for Visual Studio Code. The update improves Python environment handling, adds a Copy Test ID option for pytest functions, and makes Python virtual-environment activation more reliable across shell creation methods, PowerShell, and WSL.

### Source excerpt

The October 2025 release of the Python and Jupyter extensions for Visual Studio Code are now available. This release includes improvements to the Python Environments extension, Copy Test ID functionality, and enhanced environment activation when using Copilot Chat. Keep on reading to learn more! The post Python in Visual Studio Code - October 2025 Release appeared first on Microsoft for Python Developers Blog.

## Learning Path: Testing and Continuous Integration

DevFeed: [Learning Path: Testing and Continuous Integration](<https://devfeed.tech/articles/learning-path-testing-and-continuous-integration-4385.md>)

Original publisher: [Read original article](<https://realpython.com/learning-paths/test-your-python-apps/>)

Author: Real Python

Published: 2024-11-14T12:00:00Z

Content type: tutorial

Language: en

Sources: [Real Python](<https://devfeed.tech/sources/real-python.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>), [GitHub Actions](<https://devfeed.tech/topics/github-actions.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [Code quality](<https://devfeed.tech/topics/code-quality.md>), [Docker](<https://devfeed.tech/topics/docker.md>), [Mocking](<https://devfeed.tech/topics/mocking.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [ci-cd](<https://devfeed.tech/tags/ci-cd.md>), [code-quality](<https://devfeed.tech/tags/code-quality.md>), [docker](<https://devfeed.tech/tags/docker.md>), [github-actions](<https://devfeed.tech/tags/github-actions.md>), [learning](<https://devfeed.tech/tags/learning.md>), [mocking](<https://devfeed.tech/tags/mocking.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [python](<https://devfeed.tech/tags/python.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

A learning path for testing Python applications, covering unittest, doctest, mock objects, pytest, code quality, and continuous integration with GitHub Actions and Docker.

### Source excerpt

Learn how to test Python code with unittest, doctest, pytest, and mock objects. Set up continuous integration with GitHub Actions and Docker.

## Testing applications with Pytest and NuttX

DevFeed: [Testing applications with Pytest and NuttX](<https://devfeed.tech/articles/testing-applications-with-pytest-and-nuttx-13669.md>)

Original publisher: [Read original article](<https://developer.espressif.com/blog/2024/10/pytest-testing-with-nuttx/>)

Author: John Lee

Published: 2024-10-04T00:00:00Z

Content type: tutorial

Language: en

Sources: [Blog on Developer Portal](<https://devfeed.tech/sources/blog-on-developer-portal.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [NuttX](<https://devfeed.tech/topics/nuttx.md>), [Python](<https://devfeed.tech/topics/python.md>), [Espressif](<https://devfeed.tech/topics/espressif.md>)

Tags: [apache](<https://devfeed.tech/tags/apache.md>), [blog](<https://devfeed.tech/tags/blog.md>), [continuous-integration](<https://devfeed.tech/tags/continuous-integration.md>), [development](<https://devfeed.tech/tags/development.md>), [esp32](<https://devfeed.tech/tags/esp32.md>), [espressif](<https://devfeed.tech/tags/espressif.md>), [nuttx](<https://devfeed.tech/tags/nuttx.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [python](<https://devfeed.tech/tags/python.md>), [tdd](<https://devfeed.tech/tags/tdd.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

A practical guide to using Pytest for high-level, on-target testing of applications running on the NuttX RTOS, including test environments, fixtures, parametrization, command-line arguments, and plugins.

### Source excerpt

How Pytest is used for testing the NuttX RTOS on Espressif devices.

## Signals, shells, and docker: an onion of footguns

DevFeed: [Signals, shells, and docker: an onion of footguns](<https://devfeed.tech/articles/signals-shells-and-docker-an-onion-of-footguns-20130.md>)

Original publisher: [Read original article](<https://benchling.engineering/signals-shells-and-docker-an-onion-of-footguns-ee592e2b587b?source=rss----3d4aa8fb07ea---4>)

Author: raylu

Published: 2024-05-22T16:01:32Z

Content type: article

Language: en

Sources: [Benchling](<https://devfeed.tech/sources/benchling.md>)

Topics: [POSIX](<https://devfeed.tech/topics/posix.md>), [Bash](<https://devfeed.tech/topics/bash.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [Docker](<https://devfeed.tech/topics/docker.md>)

Tags: [bash](<https://devfeed.tech/tags/bash.md>), [docker](<https://devfeed.tech/tags/docker.md>), [linux](<https://devfeed.tech/tags/linux.md>), [logs](<https://devfeed.tech/tags/logs.md>), [pipeline](<https://devfeed.tech/tags/pipeline.md>), [pull-request](<https://devfeed.tech/tags/pull-request.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [shell-script](<https://devfeed.tech/tags/shell-script.md>), [terminal](<https://devfeed.tech/tags/terminal.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

This article investigates surprising POSIX signal behavior across shells and containers in Benchling's CI test pipeline. It explains how canceled test runs stopped forwarding logs while pytest continued running, then examines signal propagation through zsh, bash, and child processes.

### Source excerpt

On a few occasions, we've needed to debug POSIX signals (SIGINT, SIGTERM, etc.). Inevitably, there's a shell involved too. One day, we were debugging some weird interaction between signals, shells, and containers and found ourselves bamboozled by some behaviors. People who consider themselves knowledgeable about Linux have found some of the details of our investigation surprising, so read on if this sort of thing doesn't make you want to defenestrate your laptop and become an alpaca-farming hermit. The scene of the crime At Benchling, we have a pretty standard testing/continuous integration (CI) setup: when you push code to a pull request branch, we run tests for you. A few years back, we added a little optimization: if you push again and tests are still running on the previous commit, we cancel the previous test run. You probably don't care about that run anyway and we save some money... or do we? The code that runs our tests is basically def test_pipeline() -> int: test_result = subprocess.run(["pytest", ...]) report_test_metrics() upload_artifacts() return test_result.returncode So our process tree is test_pipeline └──pytest subprocess.run blocks until the child process exits, so it should take almost all the time. We see in our CI logs that the tests get interrupted halfway through and then we see no more logs, so it sure looks like it's working. But we're able to get metrics and artifacts for our canceled runs, which makes no sense. We'll later discover that while we reported that the run was canceled and stopped forwarding logs, pytest just kept running. Back to basics Thinking that perhaps the problem was not forwarding a signal from test_pipeline to pytest, we thought about basic signal handling first. In a terminal running zsh, we can get the pid of zsh with $ echo $$ 20147 Then, we can run bash inside zsh and sleep infinity (like our tests, a very slow command) inside bash. $ bash $ sleep infinity From another shell, we can see the process tree. $ pstree -p 20

## Test Failures Should Be Actionable

DevFeed: [Test Failures Should Be Actionable](<https://devfeed.tech/articles/test-failures-should-be-actionable-23857.md>)

Original publisher: [Read original article](<http://testing.googleblog.com/2024/05/test-failures-should-be-actionable.html>)

Author: Google Testing Bloggers (noreply@blogger.com)

Published: 2024-05-06T13:26:00Z

Content type: article

Language: en

Sources: [Google Testing Blog](<https://devfeed.tech/sources/google-testing-blog.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [site-reliability-engineering](<https://devfeed.tech/topics/site-reliability-engineering.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Pytest](<https://devfeed.tech/topics/pytest.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [site-reliability-engineering](<https://devfeed.tech/tags/site-reliability-engineering.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [testing](<https://devfeed.tech/tags/testing.md>), [titus-winters](<https://devfeed.tech/tags/titus-winters.md>), [tott](<https://devfeed.tech/tags/tott.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>)

### AI overview

The article argues that unit test failures should be actionable: developers should be able to start investigating using only the test name and failure messages. It recommends precise invariants and assertion-library matchers, illustrating the point with a C++ status-check example.

### Source excerpt

This article was adapted from a Google Testing on the Toilet (TotT) episode. You can download a printer-friendly version of this TotT episode and post it in your office. By Titus Winters There are a lot of rules and best practices around unit testing. There are many posts on this blog; there is deeper material in the Software Engineering at Google book; there is specific guidance for every major language; there is guidance on test frameworks, test naming, and dozens of other test-related topics. Isn't this excessive? Good unit tests contain several important properties, but you could focus on a key principle: Test failures should be actionable. When a test fails, you should be able to begin investigation with nothing more than the test's name and its failure messages--no need to add more information and rerun the test. Effective use of unit test frameworks and assertion libraries (JUnit, Truth, pytest, GoogleTest, etc.) serves two important purposes. Firstly, the more precisely we express the invariants we are testing, the more informative and less brittle our tests will be. Secondly, when those invariants don't hold and the tests fail, the failure info should be immediately actionable. This meshes well with Site Reliability Engineering guidance on alerting. Consider this example of a C++ unit test of a function returning an absl::Status (an Abseil type that returns either an "OK" status or one of a number of different error codes): EXPECT_TRUE(LoadMetadata().ok()); EXPECT_OK(LoadMetadata()); Sample failure output load_metadata_test.cc:42: Failure Value of: LoadMetadata().ok() Expected: true Actual: false load_metadata_test.cc:42: Failure Value of: LoadMetadata() Expected: is OK Actual: NOT_FOUND: /path/to/metadata.bin If the test on the left fails, you have to investigate why the test failed; the test on the right immediately gives you all the available detail, in this case because of a more precise GoogleTest matcher. Here are some other posts on this blog that emp

## Data-driven CI pipeline monitoring with pytest

DevFeed: [Data-driven CI pipeline monitoring with pytest](<https://devfeed.tech/articles/data-driven-ci-pipeline-monitoring-with-pytest-18459.md>)

Original publisher: [Read original article](<https://www.tinybird.co/blog/data-driven-ci-pipeline-monitoring-with-pytest>)

Author: Juan Madurga

Published: 2023-07-07T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tinybird](<https://devfeed.tech/sources/tinybird.md>)

Topics: [ci](<https://devfeed.tech/topics/ci.md>), [Pytest](<https://devfeed.tech/topics/pytest.md>), [observability](<https://devfeed.tech/topics/observability.md>), [Monitoring](<https://devfeed.tech/topics/monitoring.md>)

Tags: [ci](<https://devfeed.tech/tags/ci.md>), [i-built-this](<https://devfeed.tech/tags/i-built-this.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [observability](<https://devfeed.tech/tags/observability.md>), [pipeline](<https://devfeed.tech/tags/pipeline.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [test](<https://devfeed.tech/tags/test.md>), [tests](<https://devfeed.tech/tags/tests.md>)

### AI overview

This article discusses using pytest to monitor CI pipelines with data and observability, helping detect failures that traditional tests may miss.

### Source excerpt

Data-driven CI pipeline monitoring with pytest catches failures traditional tests miss. Add observability to your test suite today.

## Road to 100% Test Coverage on notion-sdk-py

DevFeed: [Road to 100% Test Coverage on notion-sdk-py](<https://devfeed.tech/articles/road-to-100-test-coverage-on-notion-sdk-py-40833.md>)

Original publisher: [Read original article](<https://mutto.fyi/posts/2022/12/road-100-coverage-notion/>)

Published: 2022-12-26T00:00:00Z

Content type: tutorial

Language: en

Sources: [Mutt0-ds Notes](<https://devfeed.tech/sources/mutt0-ds-notes.md>)

Topics: [test-coverage](<https://devfeed.tech/topics/test-coverage.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Python](<https://devfeed.tech/topics/python.md>), [Pytest](<https://devfeed.tech/topics/pytest.md>), [SDK](<https://devfeed.tech/topics/sdk.md>), [Notion](<https://devfeed.tech/topics/notion.md>)

Tags: [pytest](<https://devfeed.tech/tags/pytest.md>), [python](<https://devfeed.tech/tags/python.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [test-coverage](<https://devfeed.tech/tags/test-coverage.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

A practical discussion of improving test coverage for notion-sdk-py using pytest. It explains what coverage measures, why 100% coverage does not guarantee meaningful tests, and how testing can reveal areas for improvement.

### Source excerpt

There is something bizarre with me if two of my favourite activities are writing documentation and hitting my head against tests, which are...

## Searching for RH Counterexamples -- Deploying with Docker

DevFeed: [Searching for RH Counterexamples -- Deploying with Docker](<https://devfeed.tech/articles/searching-for-rh-counterexamples-deploying-with-docker-40442.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2021/01/04/searching-for-rh-counterexamples-deploying-with-docker/>)

Published: 2021-01-04T09:00:00Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Docker](<https://devfeed.tech/topics/docker.md>), [Containers](<https://devfeed.tech/topics/containers.md>), [reproducibility](<https://devfeed.tech/topics/reproducibility.md>), [Database](<https://devfeed.tech/topics/database.md>), [Server](<https://devfeed.tech/topics/server.md>)

Tags: [aws](<https://devfeed.tech/tags/aws.md>), [containers](<https://devfeed.tech/tags/containers.md>), [database](<https://devfeed.tech/tags/database.md>), [docker](<https://devfeed.tech/tags/docker.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [programming](<https://devfeed.tech/tags/programming.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [reproducibility](<https://devfeed.tech/tags/reproducibility.md>), [riemann-hypothesis](<https://devfeed.tech/tags/riemann-hypothesis.md>), [server](<https://devfeed.tech/tags/server.md>), [software](<https://devfeed.tech/tags/software.md>)

### AI overview

A tutorial on deploying an application that searches for counterexamples to the Riemann Hypothesis. It explains reproducibility and hermeticity, then uses Docker containers for the database, search application, and planned web server.

### Source excerpt

We're ironically searching for counterexamples to the Riemann Hypothesis. Setting up Pytest Adding a Database Search Strategies Unbounded Integers In this article we'll deploy the application on a server, so that it can search for RH counterexamples even when I close my laptop. Servers and containers When deploying applications to servers, reproducibility is crucial. You don't want your application to depend on the details of the computer it's running on. This is a higher-level version of the same principle behind Python virtual environments, but it applies to collections of programs, possibly written in different languages and running on different computers.

## Searching for RH Counterexamples -- Setting up Pytest

DevFeed: [Searching for RH Counterexamples -- Setting up Pytest](<https://devfeed.tech/articles/searching-for-rh-counterexamples-setting-up-pytest-40438.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2020/09/11/searching-for-rh-counterexamples-setting-up-pytest/>)

Published: 2020-09-11T15:51:48Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Pytest](<https://devfeed.tech/topics/pytest.md>), [Python](<https://devfeed.tech/topics/python.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Code](<https://devfeed.tech/topics/code.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [development-environment](<https://devfeed.tech/tags/development-environment.md>), [git](<https://devfeed.tech/tags/git.md>), [github](<https://devfeed.tech/tags/github.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [number-theory](<https://devfeed.tech/tags/number-theory.md>), [programming](<https://devfeed.tech/tags/programming.md>), [project-organization](<https://devfeed.tech/tags/project-organization.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [python](<https://devfeed.tech/tags/python.md>), [riemann-hypothesis](<https://devfeed.tech/tags/riemann-hypothesis.md>), [setup](<https://devfeed.tech/tags/setup.md>), [shell](<https://devfeed.tech/tags/shell.md>), [software](<https://devfeed.tech/tags/software.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

A hands-on tutorial that sets up a Python 3.8 project with pytest and Git, using a search for counterexamples related to the Riemann Hypothesis as the example problem. It explains terminal-based project setup, testing, organization, and how design evolves during development.

### Source excerpt

Some mathy-programmy people tell me they want to test their code, but struggle to get set up with a testing framework. I suspect it's due to a mix of: There are too many choices with a blank slate. Making slightly wrong choices early on causes things to fail in unexpected ways. I suspect the same concerns apply to general project organization and architecture. Because Python is popular for mathy-programmies, I'll build a Python project that shows how I organize my projects and and test my code, and how that shapes the design and evolution of my software.

## Testing an Interactive Voice Response System With Python and Pytest

DevFeed: [Testing an Interactive Voice Response System With Python and Pytest](<https://devfeed.tech/articles/testing-an-interactive-voice-response-system-with-python-and-pytest-33930.md>)

Original publisher: [Read original article](<https://hakibenita.com/python-django-pytest-twilio-ivr>)

Author: Haki Benita

Published: 2020-04-30T21:00:00Z

Content type: tutorial

Language: en

Sources: [Haki Benita](<https://devfeed.tech/sources/haki-benita.md>)

Topics: [Pytest](<https://devfeed.tech/topics/pytest.md>), [Python](<https://devfeed.tech/topics/python.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>), [business logic](<https://devfeed.tech/topics/business-logic.md>), [Django](<https://devfeed.tech/topics/django.md>)

Tags: [articles](<https://devfeed.tech/tags/articles.md>), [automated](<https://devfeed.tech/tags/automated.md>), [business-logic](<https://devfeed.tech/tags/business-logic.md>), [django](<https://devfeed.tech/tags/django.md>), [patterns](<https://devfeed.tech/tags/patterns.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [python](<https://devfeed.tech/tags/python.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

This tutorial explains how to write automated tests for a Twilio Interactive Voice Response system built with Python and Django. It focuses on isolating business logic from the third-party service so the logic can be tested separately, using Pytest fixtures and other testing patterns.

### Source excerpt

It can be very challenging to test a system that rely heavily on a third party service such as Twilio. In this article, I show how to organize your code in a way that would isolate your bushiness logic and make it easier for you to test it separately.

## How to Provide Test Fixtures for Django Models in Pytest

DevFeed: [How to Provide Test Fixtures for Django Models in Pytest](<https://devfeed.tech/articles/how-to-provide-test-fixtures-for-django-models-in-pytest-33900.md>)

Original publisher: [Read original article](<https://hakibenita.com/django-pytest-fixtures>)

Author: Haki Benita

Published: 2020-04-07T21:00:00Z

Content type: tutorial

Language: en

Sources: [Haki Benita](<https://devfeed.tech/sources/haki-benita.md>)

Topics: [Django](<https://devfeed.tech/topics/django.md>), [Pytest](<https://devfeed.tech/topics/pytest.md>), [test](<https://devfeed.tech/topics/test.md>)

Tags: [articles](<https://devfeed.tech/tags/articles.md>), [dependency](<https://devfeed.tech/tags/dependency.md>), [django](<https://devfeed.tech/tags/django.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [python](<https://devfeed.tech/tags/python.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>)

### AI overview

This tutorial explains how to maintain flexible, usable test fixtures for Django models with Pytest. It covers setting up Pytest in a Django project, creating fixtures, defining fixture dependencies, and applying a "factory as a service" pattern to simplify test data setup.

### Source excerpt

One of the most challenging aspects of writing good tests is maintaining test fixtures. Good test fixtures motivate developers to write better tests, and bad fixtures can cripple a system to a point where developers fear and avoid them all together. The article covers everything from setting up Pytest for a Django project, creating test fixtures and how to create dependency between fixtures.

## Outreachy Internship Update: Learning Mozilla's Development Process and Refactoring Marionette's Python Test Runner

DevFeed: [Outreachy Internship Update: Learning Mozilla's Development Process and Refactoring Marionette's Python Test Runner](<https://devfeed.tech/articles/outreachy-halftime-ish-update-20249.md>)

Original publisher: [Read original article](<http://anjana.dev/blog/outreachy-halftime-ish-update/>)

Author: Anjana Sofia Vakil (contact@anjana.dev)

Published: 2016-08-02T00:00:00Z

Content type: opinion

Language: en

Sources: [Mozilla Automation](<https://devfeed.tech/sources/mozilla-automation.md>)

Topics: [Development](<https://devfeed.tech/topics/development.md>), [Mozilla](<https://devfeed.tech/topics/mozilla.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Python](<https://devfeed.tech/topics/python.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Pytest](<https://devfeed.tech/topics/pytest.md>), [Firefox](<https://devfeed.tech/topics/firefox.md>)

Tags: [development-process](<https://devfeed.tech/tags/development-process.md>), [firefox](<https://devfeed.tech/tags/firefox.md>), [internship](<https://devfeed.tech/tags/internship.md>), [marionette](<https://devfeed.tech/tags/marionette.md>), [mozilla](<https://devfeed.tech/tags/mozilla.md>), [mozreview](<https://devfeed.tech/tags/mozreview.md>), [outreachy](<https://devfeed.tech/tags/outreachy.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [python](<https://devfeed.tech/tags/python.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [treeherder](<https://devfeed.tech/tags/treeherder.md>)

### AI overview

An Outreachy intern reflects on the first part of an internship with Mozilla, describing the process of learning Mozilla's development tools and workflows. The article also outlines work on test-driven refactoring of Marionette's Python test runner and previews a follow-up post about its test runner and harness.

### Source excerpt

It feels like yesterday that I started my Outreachy internship, but it was actually over 2 months ago! For the last couple of weeks I've been on Outreachy hiatus because of EuroPython, moving from Saarbrücken to Berlin, and my mentor being on vacation. Now I'm back, with 6 weeks left in my internship! So it seems like a good moment to check in and reflect on how things have been going so far, and what's in store for the rest of my time as an Outreachyee. What have I been up to? Learning how to do the work In the rather involved application process for Outreachy, I already had to spend quite a bit of time figuring out the process for making even the tiniest contribution to the Mozilla codebase. But obviously one can't learn everything there is to know about a project within a couple of weeks, so a good chunk of my Outreachy time so far was spent on getting better acquainted with: The tools I've already written about my learning experiences with Mercurial, but there were a lot of other components of the Mozilla development process that I had to learn about (and am still learning about), such as Bugzilla, MozReview, Treeherder, Try, Mach... Then, since the project I'm working focuses on testing, I had to grok things like Pytest and Mock. Since most everything I'm doing is in Python, I've also been picking up useful Python tidbits here and there. The project My internship project, "Test-driven refactoring of Marionette's Python test runner", relates to a component of the Marionette project, which encompasses a lot of moving parts. Even figuring out what Marionette is, what components it comprises, how these interrelate, and which of them I need to know about, was a non-trivial task. That's why I'm writing a couple of posts about the project itself - one down, one to go - to crystallize what I've learned and hopefully make it a little easier for other people to get through the what-even-is-it steps that I've been going through. This post is a sort of "intermission", so sta