<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pytest on Text Matrix</title><link>https://txtmix.com/tags/pytest/</link><description>Recent content in Pytest on Text Matrix</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Tue, 21 Jul 2026 20:06:14 +0800</lastBuildDate><atom:link href="https://txtmix.com/tags/pytest/index.xml" rel="self" type="application/rss+xml"/><item><title>pytest：Python 测试框架的事实标准，从 assert 反射到 fixture 体系</title><link>https://txtmix.com/posts/tech/pytest-python-testing-framework-advanced-usage-guide/</link><pubDate>Sun, 14 Jun 2026 21:13:12 +0800</pubDate><guid>https://txtmix.com/posts/tech/pytest-python-testing-framework-advanced-usage-guide/</guid><description>&lt;h1 id="pytestpython-测试框架的事实标准从-assert-反射到-fixture-体系">pytest：Python 测试框架的事实标准，从 assert 反射到 fixture 体系&lt;/h1>
&lt;blockquote>
&lt;p>pytest 的入门门槛很低，一个 &lt;code>assert&lt;/code> 就能写测试。但真正让它难以替代的是 fixture 体系、parametrize、conftest.py 加上 1300 多个插件——从一行 demo 到十万级用例的测试工程都能撑住。新手常把它当 unittest 替代品，老手把它当测试编排框架，两种用法并不冲突。&lt;/p></description></item></channel></rss>