We're sunsetting PodQuest on 2025-07-28. Thank you for your support!
Export Podcast Subscriptions
cover of episode Python 3.14 won't repeat with pytest-repeat

Python 3.14 won't repeat with pytest-repeat

2025/4/1
logo of podcast Test & Code

Test & Code

AI Deep Dive AI Chapters Transcript
People
播音员
主持著名true crime播客《Crime Junkie》的播音员和创始人。
Topics
播音员:pytest-repeat是一个方便的pytest插件,可以重复运行测试用例。它支持通过命令行参数`--count`或测试函数装饰器`@pytest.mark.repeat`来指定重复次数。此外,还可以使用`repeat scope`参数控制重复的范围,例如重复整个测试会话。我在Python 3.13版本上成功测试了该插件,但在Python 3.14版本上却失效了,无法重复运行测试。我尝试修改tox配置文件,在Python 3.14环境下重新测试,问题依然存在。目前我无法解释这种现象,因为从插件的源码来看,它使用了标准的pytest机制,没有明显的错误。这个失效问题没有任何合理解释,我将继续调查原因。

Deep Dive

Shownotes Transcript

pytest-repeat is a pytest plugin that makes it easy to repeat a single test, or multiple tests, a specific number of times.  Unfortunately, it doesn't seem to work with Python 3.14, even though there is no rational reason why it shouldn't work.

Links:

**Sponsored by: **

  • The Complete pytest course) is now a bundle, with each part available separately.

  • pytest Primary Power) teaches the super powers of pytest that you need to learn to use pytest effectively.

  • Using pytest with Projects) has lots of "when you need it" sections like debugging failed tests, mocking, testing strategy, and CI

  • Then pytest Booster Rockets) can help with advanced parametrization and building plugins.

  • Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest) has a course for you.

** ★ Support this podcast on Patreon ★) **