←
pytest.org2,060 posts
pytest.org avatar

pytest.org

@pytestdotorg

A full-featured Python testing tool to help you write better programs; posts by @the_compiler bsky.app/profile/pytest.org fosstodon.org/@pytest

◷ Joined February 2015▧ 21 Photos and videos
EuroPython avatar
⟳ pytest.org retweeted
EuroPython@europython·29 Jun 2024

Check out @the_compiler presenting at #EuroPython2024, in their words: The #pytest tool presents a rapid and simple way to write tests for your Python code. This training gives an introduction with exercises to some distinguishing features. ep2024.europython.eu/session… 🐍

Freya Bruhin avatar
⟳ pytest.org retweeted
Freya Bruhin@the_compiler·30 Aug 2023

#pytest trick: Want to patch a function returning a different value on every call, without full unittest.mock? values = iter(["eggs", "bacon", "spam"]) monkeypatch.setattr(random, "choice", lambda: next(values)) assert random.choice() == "eggs" assert random.choice() == "bacon"

Freya Bruhin avatar
⟳ pytest.org retweeted
Freya Bruhin@the_compiler·7 Aug 2023

Oh, looks like @jetbrains/@ThePSF sneakily released the #Python developers survey 2022 results at some point! The first thing I look at is always how testing frameworks changed compared to the year before😅 #pytest up from 50% → 51%, "None" down from 38% → 35%. Yay!

Post attachment
Freya Bruhin avatar
⟳ pytest.org retweeted
Freya Bruhin@the_compiler·29 May 2023

Almost 3 years after #pytest-xvfb 2.0.0, I released v3.0.0 today! Other than packaging/formatting/typing/Python version updates, this release hopefully fixes a long-standing "XIO: fatal IO error 0 (Success)" issue, and adds support for using Xephyr/Xvnc. github.com/The-Compiler/pyte…

Freya Bruhin avatar
⟳ pytest.org retweeted
Freya Bruhin@the_compiler·25 Apr 2023

Blast from the past: My #pytest training from 7 years ago (mostly inherited by @hpk42) vs. now. Currently working on another big "rewrite", trying to introduce one big case study example (a small RPN calculator) instead of isolated examples for most of the code/exercises.

Post attachmentPost attachmentPost attachmentPost attachment
pytest.org avatar
pytest.org@pytestdotorg·11 Apr 2023

#pytest 7.3 was released just at the beginning of the easter weekend, it brings multiple enhancements around tmppath retention and output details, but beware we learned of a windows only perf regression thats now under investigation