mastodontech.de ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Offen für alle (über 16) und bereitgestellt von Markus'Blog

Serverstatistik:

1,4 Tsd.
aktive Profile

#pytest

0 Beiträge0 Beteiligte0 Beiträge heute

New on blog: "EPYTEST_PLUGINS and other goodies now in #Gentoo"

"""
If you are following the gentoo-dev mailing list, you may have noticed that there’s been a fair number of patches sent for the #Python eclasses recently. Most of them have been centered on #pytest support. Long story short, I’ve came up with what I believed to be a reasonably good design, and decided it’s time to stop manually repeating all the good practices in every ebuild separately.

In this post, I am going to shortly summarize all the recently added options. As always, they are all also documented in the Gentoo Python Guide.
"""

blogs.gentoo.org/mgorny/2025/0

Michał Górny · EPYTEST_PLUGINS and other goodies now in GentooIf you are following the gentoo-dev mailing list, you may have noticed that there’s been a fair number of patches sent for the Python eclasses recently. Most of them have been centered on pyt…

NumPy - SciPy - Pandas (2025-07-06, 6-day workshop)

PRE-REQ
You are expected to have programming experience with Python 3, Pytest, Poetry on GNU/Linux.

FOCUS
Features in the new releases
Key programming abstractions
Coding with Python Generics
DataFrame
Functional approach to writing code
Multi-core Performance benchmarking
Packaging considerations

ENVIRONMENT
GNU/Linux system
NumPy
SciPy
Pandas
Python 3.12+
Pytest
Poetry
Git

Event is free to attend but RSVP is required.

Absolutely safe for students and women to attend. Code of conduct applies.

RSVP Cairo (and Maghreb)
meetup.com/softwarehubcairo/

RSVP Ankara (and Turkmen)
meetup.com/softwarehub

RSVP Riyadh (and Mashreq)
meetup.com/softwarehubriyadh/

All members of the Ummah are cordially invited.

#NumPy
#SciPy
#Pandas
#Python
#Poetry
#Pytest
#DataScience
#DataEngineering
#SoftwareFreedom
#SoftwareFreedomProject
#GNU
#Linux
#Community
#Ummah

une bibliothèque pour mocker les ressources #AWS utilisées dans le code de production #Python que vous testez (S3, par exemple) : github.com/getmoto/moto

La page github.com/getmoto/moto/blob/m documente comment écrire les tests (#pytest, #unittest) et donne quelques conseils pour écrire du code de production plus facile à tester (en ce qui concerne les interactions avec boto3, le client vers les services AWS).

GitHubGitHub - getmoto/moto: A library that allows you to easily mock out tests based on AWS infrastructure.A library that allows you to easily mock out tests based on AWS infrastructure. - getmoto/moto
Antwortete John-Mark Gurney

@encthenet @rachelplusplus Dunno if you've considered this, or would consider it, but pytest has a plugin, pytest-fakefs (github.com/pytest-dev/pyfakefs), 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.

Or if you prefer, pytest also has built-in functionality that makes working with temporary files pretty easy.

GitHubGitHub - pytest-dev/pyfakefs: Provides a fake file system that mocks the Python file system modules.Provides a fake file system that mocks the Python file system modules. - pytest-dev/pyfakefs

Idle thought apropos of nothing specific:

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.

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.

I don't see a movement to merge pytest to the stdlib.

A tak poza tym, to wysłałem parę łatek, by ulepszyć funkcję epytest w #Gentoo.

Wymuszają krótkie podsumowania, załączają tworzenie plików junit .xml, żeby ułatwić maszynowe przetwarzanie wyników, i — co najważniejsze — dodają zmienną EPYTEST_PLUGINS, żeby podawać, które wtyczki mają być załadowane. Będziemy dążyć do tego, by całkiem odejść od domyślnego automatycznego ładowania wtyczek.

archives.gentoo.org/gentoo-dev

archives.gentoo.org[gentoo-dev] [PATCH 0/5] python-utils-r1.eclass: epytest improvements

In other news, I've sent a few fun patches to improve epytest in #Gentoo.

This includes forcing short summaries, creating junit .xml for machine processing, and most importantly, EPYTEST_PLUGINS to handle specifying the plugins to load. The goal is to eventually move away from plugin autoloading by default.

archives.gentoo.org/gentoo-dev

archives.gentoo.org[gentoo-dev] [PATCH 0/5] python-utils-r1.eclass: epytest improvements