veganism.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Veganism Social is a welcoming space on the internet for vegans to connect and engage with the broader decentralized social media community.

Administered by:

Server stats:

296
active users

#pytest

4 posts4 participants0 posts today
Veit Schiele 🔜 @FrOSCon<p>After a discussion about why omitting coverage for tests is not a good idea, I added a tip to our test tutorial: <a href="https://python-basics-tutorial.readthedocs.io/en/latest/test/pytest/coverage.html#coverage-tip" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">python-basics-tutorial.readthe</span><span class="invisible">docs.io/en/latest/test/pytest/coverage.html#coverage-tip</span></a><br><a href="https://mastodon.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://mastodon.social/tags/Testing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Testing</span></a> <a href="https://mastodon.social/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> <a href="https://mastodon.social/tags/coverage" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>coverage</span></a></p>
openSUSE Linux<p>Say goodbye to the container testing headache! Learn how <a href="https://fosstodon.org/tags/pytest_container" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest_container</span></a> + test infra make testing apps inside <a href="https://fosstodon.org/tags/containers" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>containers</span></a> smooth and scalable (all in <a href="https://fosstodon.org/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a>) from this <a href="https://fosstodon.org/tags/oSC25" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>oSC25</span></a> talk. <a href="https://fosstodon.org/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> <a href="https://fosstodon.org/tags/DevOps" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DevOps</span></a> <a href="https://fosstodon.org/tags/openSUSE" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>openSUSE</span></a> <a href="https://youtu.be/kU9NS1FpfY8?si=qyjoR5zfMWI7qpY3" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">youtu.be/kU9NS1FpfY8?si=qyjoR5</span><span class="invisible">zfMWI7qpY3</span></a></p>
mgorny-nyan (he) :autism:🙀🚂🐧<p><span class="h-card" translate="no"><a href="https://floss.social/@hroncok" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>hroncok</span></a></span>, do you think we should aim at replacing `flaky` with `pytest-rerunfailures`? I see quite a lot of <a href="https://social.treehouse.systems/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> packages are using `@flaky.flaky` decorator directly, even though they are using <a href="https://social.treehouse.systems/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> otherwise.</p>
Matt Layman<p>🐍 <a href="https://mastodon.social/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> is a powerful tool for testing your <a href="https://mastodon.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> projects. In this pytest 201 presentation, I covered some of the more advanced features beyond the core assertion ability of the library (e.g., fixtures, parameterization). <a href="https://www.youtube.com/watch?v=fv259R38gqc" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="">youtube.com/watch?v=fv259R38gqc</span><span class="invisible"></span></a></p>
openSUSE Linux<p>Tired of reinventing the wheel for container testing? See how the <a href="https://fosstodon.org/tags/pytest_container" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest_container</span></a> plugin simplifies testing <a href="https://fosstodon.org/tags/containers" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>containers</span></a> with <a href="https://fosstodon.org/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> in this <a href="https://fosstodon.org/tags/oSC25" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>oSC25</span></a> talk! No more plumbing; just define, connect, <a href="https://fosstodon.org/tags/test" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>test</span></a> and go. <a href="https://fosstodon.org/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> <a href="https://fosstodon.org/tags/DevOps" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DevOps</span></a> <a href="https://fosstodon.org/tags/openSUSE" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>openSUSE</span></a> <a href="https://youtu.be/kU9NS1FpfY8?si=qyjoR5zfMWI7qpY3" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">youtu.be/kU9NS1FpfY8?si=qyjoR5</span><span class="invisible">zfMWI7qpY3</span></a></p>
John-Mark Gurney<p><span class="h-card" translate="no"><a href="https://techhub.social/@diazona" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>diazona</span></a></span></p><p><span class="h-card" translate="no"><a href="https://tech.lgbt/@rachelplusplus" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>rachelplusplus</span></a></span></p><p>That won't work. It says so in the docs:<br>&gt; pyfakefs will not work with Python libraries that use C libraries to access the file system.</p><p>Which is what numpy is doing. </p><p><a href="https://flyovercountry.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://flyovercountry.social/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> <a href="https://flyovercountry.social/tags/UnitTesting" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>UnitTesting</span></a></p>
David Zaslavsky<p><span class="h-card" translate="no"><a href="https://flyovercountry.social/@encthenet" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>encthenet</span></a></span> <span class="h-card" translate="no"><a href="https://tech.lgbt/@rachelplusplus" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>rachelplusplus</span></a></span> Dunno if you've considered this, or would consider it, but pytest has a plugin, pytest-fakefs (<a href="https://github.com/pytest-dev/pyfakefs" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/pytest-dev/pyfakefs</span><span class="invisible"></span></a>), that implements an in-memory filesystem complete with file objects that you can use to test file handling code without having to put things on disk. IMO the plugin ecosystem for handling things like this is one of pytest's biggest advantages over unittest.</p><p>Or if you prefer, pytest also has built-in functionality that makes working with temporary files pretty easy.</p><p><a href="https://techhub.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://techhub.social/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> <a href="https://techhub.social/tags/UnitTesting" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>UnitTesting</span></a></p>
openSUSE Linux<p>Today's morning sessions are on Uyuni, <a href="https://fosstodon.org/tags/Aeon" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Aeon</span></a> Desktop, <a href="https://fosstodon.org/tags/encryption" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>encryption</span></a> on <a href="https://fosstodon.org/tags/Steam" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Steam</span></a> Decks, <a href="https://fosstodon.org/tags/Kalpa" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Kalpa</span></a>, branding, <a href="https://fosstodon.org/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> for <a href="https://fosstodon.org/tags/containers" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>containers</span></a>, <a href="https://fosstodon.org/tags/zypper" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>zypper</span></a> speed and more.! <a href="https://streaming.media.ccc.de/osc25" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">streaming.media.ccc.de/osc25</span><span class="invisible"></span></a></p>
Carlton Gibson<p>Idle thought apropos of nothing specific: </p><p>The very same folks telling me BOTH that I MUST use pytest, and that Django MUST have its JSON API story built-in continues to be ironic. </p><p>I'd (probably) at least open with the thought that testing is easily as central to a language as JSON APIs are to a web framework.</p><p>I don't see a movement to merge pytest to the stdlib. </p><p><a href="https://chaos.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://chaos.social/tags/Django" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Django</span></a> <a href="https://chaos.social/tags/Pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Pytest</span></a></p>
Honza Javorek<p>Every time pytest releases a new version I get 164432678906432 reminders about how many (side) projects with Dependabot turned on I still have.</p><p><a href="https://mastodonczech.cz/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> <a href="https://mastodonczech.cz/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://mastodonczech.cz/tags/github" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>github</span></a> <a href="https://mastodonczech.cz/tags/dependabot" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dependabot</span></a></p>
Agnès H.<p>Dites, la team <a href="https://framapiaf.org/tags/django" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>django</span></a> <a href="https://framapiaf.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://framapiaf.org/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> : il me semble avoir vu passer la réf d'un package permettant de mocker les API tierces pour éviter de faire des appels réseau dans nos tests. Ça vous dit quelque chose ?</p>
Python Rennes<p>si vous avez besoin de générer des tests paramétrés <a href="https://social.breizhcamp.org/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> avec <a href="https://social.breizhcamp.org/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> avec de nombreux cas, il est possible de les définir dans un fichier CSV plutôt que dans le code, avec <a href="https://pypi.org/project/pytest-csv-params/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">pypi.org/project/pytest-csv-pa</span><span class="invisible">rams/</span></a>.</p><p>Un tutoriel : <a href="https://first.institute/en/blog/how-to-separate-test-data-from-code-csv-pytest/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">first.institute/en/blog/how-to</span><span class="invisible">-separate-test-data-from-code-csv-pytest/</span></a></p>
James Bennett<p>A question for <a href="https://infosec.exchange/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> folks: when using <a href="https://infosec.exchange/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> fixtures, how do you prefer to provide arguments to a fixture?</p><p>If you're unsure what the options mean, the following posts will provide links explaining each one.</p>
Yngve Mardal Moe 🐍🐢🪡<p>I'm adding resources for future reading for mine and Marie's <a href="https://fosstodon.org/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://fosstodon.org/tags/packaging" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>packaging</span></a> tutorial for <a href="https://fosstodon.org/tags/PyConUS" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyConUS</span></a>, and I realised that I don't know any good <a href="https://fosstodon.org/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> tutorials for beginners. Does anyone have any reccommendations?</p>
David Zaslavsky<p><span class="h-card" translate="no"><a href="https://fosstodon.org/@gagliardi_vale" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>gagliardi_vale</span></a></span> The <a href="https://techhub.social/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> documentation is also pretty decent, come to think of it: <a href="https://docs.pytest.org/en/stable/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">docs.pytest.org/en/stable/</span><span class="invisible"></span></a></p><p><a href="https://techhub.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a></p>
Delta Chat<p>Decentralizers, attention! :) </p><p>Last <a href="https://chaos.social/tags/deltachat" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>deltachat</span></a> releases introduced stable <a href="https://chaos.social/tags/p2p" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>p2p</span></a> group membership not found in any other messenger. Members can add/remove peers also while being offline, and when everything comes online again, everyone has the same consistent membership view. We formalized and ran a simulation model using <a href="https://chaos.social/tags/TLA" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TLA</span></a>+ (invented by Leslie Lamport of vector clock fame):</p><p><a href="https://github.com/chatmail/models/tree/main/group-membership" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/chatmail/models/tre</span><span class="invisible">e/main/group-membership</span></a></p><p>and a complementary <a href="https://chaos.social/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> model with more corner cases tested here:</p><p><a href="https://github.com/chatmail/models/blob/main/gmc/test_gmc.py" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/chatmail/models/blo</span><span class="invisible">b/main/gmc/test_gmc.py</span></a></p>
holga<p>Dear <span class="h-card" translate="no"><a href="https://fosstodon.org/@ThePSF" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>ThePSF</span></a></span> ...</p><p>having been engaged with <a href="https://chaos.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> through co-creating <a href="https://chaos.social/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> <a href="https://chaos.social/tags/pypy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pypy</span></a>, giving talks and trainings i appreciate that the PSF has long been a champion of diversity and inclusion! Are you aware that these days many non-USians are canceling their US travels? The German foreign ministry warns about travel to the US if you are pregnant or don't have your passport carrying a birth gender marker, then this: <a href="https://www.kpbs.org/news/border-immigration/2025/02/28/german-tourist-held-indefinitely-in-san-diego-area-immigrant-detention-facility" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">kpbs.org/news/border-immigrati</span><span class="invisible">on/2025/02/28/german-tourist-held-indefinitely-in-san-diego-area-immigrant-detention-facility</span></a> </p><p>Maybe better update the <a href="https://chaos.social/tags/Pycon" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Pycon</span></a> webpage accordingly?</p>
David Zaslavsky<p><span class="h-card" translate="no"><a href="https://mstdn.social/@WillyECoyote69" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>WillyECoyote69</span></a></span> Definitely pytest, if you ask me. pytest is by far my favorite testing framework out of all the ones I've used across different programming languages.</p><p>Unless using things outside the standard library is a huge burden for you, of course, but that's rarely the case.</p><p><a href="https://techhub.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://techhub.social/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a></p>
filip<p>Some notes on the margin of Chapter 3 of <span class="h-card" translate="no"><a href="https://fosstodon.org/@hjwp" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>hjwp</span></a></span> and Bob Gregory's Architecture Patterns with Python. (great book, btw) <a href="https://filip.lajszczak.dev/testing-dependency-injection-with-mocks--notes-on-the-margin-of-chapter-3-of-architecture-patterns-with-python.html" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">filip.lajszczak.dev/testing-de</span><span class="invisible">pendency-injection-with-mocks--notes-on-the-margin-of-chapter-3-of-architecture-patterns-with-python.html</span></a> <a href="https://functional.cafe/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://functional.cafe/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> <a href="https://functional.cafe/tags/ddd" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ddd</span></a> <a href="https://functional.cafe/tags/tdd" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>tdd</span></a></p>
Brian Okken :python:<p>pytest-mock : Mocking in pytest<br>Test &amp; Code episode<br><a href="https://testandcode.com/episodes/pytest-mock" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">testandcode.com/episodes/pytes</span><span class="invisible">t-mock</span></a><br>- Why the pytest-mock plugin is awesome<br>- Mocking, patching, monkeypatching<br>- Mocks, fakes, stubs and spies<br>- Why do we need these for testing<br>- pytest-mock as a curated wrapper around unittest.mock<br><a href="https://fosstodon.org/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://fosstodon.org/tags/pytest" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pytest</span></a> <a href="https://fosstodon.org/tags/mock" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mock</span></a></p>