🐍 This #pytest 101 talk explains what automated tests are and how to get started with pytest for your #Python projects. https://www.youtube.com/watch?v=etosV2IWBF0
🐍 This #pytest 101 talk explains what automated tests are and how to get started with pytest for your #Python projects. https://www.youtube.com/watch?v=etosV2IWBF0
Параллелизация pytest: от xdist до Kubernetes
Тесты — это хорошо. Медленные тесты — это CI на 40 минут и разработчики, которые забывают их запускать локально. Разберём, как ускорить pytest от простого -n auto до распределённого запуска в Kubernetes.
https://habr.com/ru/companies/otus/articles/988088/
#python #параллелизация_тестов #pytest #изоляция_фикстур #flakyтесты
Работа с нестабильными тестами в Allure 3
Нестабильные (flaky) тесты создают постоянные трудности для тестировщиков. Такие тесты не отражают состояния тестируемой системы и подрывают доверие к тестовому набору. Вооружившись лучшими практиками, нестабильность можно свести к минимуму, но полностью избавиться от неё крайне трудно. Чтобы лучше её контролировать, нужны инструменты, позволяющие выявлять нестабильные тесты — например, Allure Report. В этом руководстве мы посмотрим, как Allure работает с нестабильными тестами. Заодно мы познакомимся с Allure 3 . Многие из вас наверняка пользуются Allure 2 — в третьей версии (помимо прочих изменений) работа с нестабильными тестами стала гораздо удобнее, в особенности настройка истории тестов.
https://habr.com/ru/companies/testops_tms/articles/988980/
#allure #тестирование #qa #автоматизация #автотест #pytest #flaky #нестабильные_тесты
🐍 #pytest is a powerful tool for testing your #Python 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). https://www.youtube.com/watch?v=fv259R38gqc
Как автоматизировать сертификационное тестирование дисковых массивов: несколько секретов
Всем привет! Меня зовут Александр, я старший инженер по верификации в YADRO . В блоге уже были статьи о том, как мои коллеги из других отделов мучают наши дисковые массивы, — одна из них тут . Наш отдел тоже работает с системами хранения данных, но без издевательств над массивами: мы проводим сертификационное тестирование. Результат трудов — сертификат, подписанный с обеих сторон и подтверждающий совместимость нашего изделия и стороннего программного продукта или аппаратного средства. Для коммерческих и государственных организаций такие сертификаты — серьезный аргумент при планировании закупки оборудования или ПО. Вот только из-за приличного объема ручного тестирования сертификация отнимает много времени и сил, поэтому мы стараемся автоматизировать процесс. Многое пока только в планах, но кое-что уже удалось реализовать. Удачными приемами как раз и поделюсь сегодня — сможете применить в своих проектах.
https://habr.com/ru/companies/yadro/articles/980404/
#testy #ansible #storage #pytest #python #тестирование_itсистем #системное_администрирование #сертификация #сертификация_в_ит
Ever wondered how to parametrize exception testing in PyTest?
Try this:
https://borutzki.github.io/2026/01/15/how-to-parametrize-exception-testing-in-pytest.html
#DailyPythonista #python #programming #Pytest #TDD #unittest
https://pytest-watcher.readthedocs.io/ aka https://github.com/olzhasar/pytest-watcher does exactly what I want; sit parked in its own terminal beside an ide and continually re-run tests whenever something changes.
🐍 This #pytest 101 talk explains what automated tests are and how to get started with pytest for your #Python projects. https://www.youtube.com/watch?v=etosV2IWBF0
When writing asserts in tests, do you put the actual first or the expected?
The convention seems to be: actual first. But, annoyingly, I need to rearrange them to check if an expected is _in_ an actual which I tend to do a fair amount.
Maybe that's a testing code smell. Or maybe I'm just overthinking this. 😅
Running the whole test suite (~135 tests) for django-new takes around 20 seconds. Trying out the new to me library, pyfakefs: https://pytest-pyfakefs.readthedocs.io.
Example test results:
- Using `tmp_path`: 0.95s
- Using `fs`: 0.17s
I'll take a 5x speed-up if I don't run into any gotchas!
Here’s what I'm following to replace tmp_path in #pytest: https://pytest-pyfakefs.readthedocs.io/en/latest/troubleshooting.html#a-replacement-for-the-tmp-path-fixture.
📽️ Ah, the riveting saga of *detecting* video codecs with #Python... because why upgrade your iPhone when you can waste hours #scripting instead? 😂 Just imagine the thrill of running #pytest on your media library while the rest of us simply watch videos. 🎞️
https://alexwlchan.net/2025/detecting-av1-videos/ #detectingcodecs #videolibrary #humor #HackerNews #ngated
Worked on some more #Gentoo global #jobserver goodies today.
Firstly, Portage jobserver support patch: https://github.com/gentoo/portage/pull/1528. It's not yet perfect, but it seems to work. If enabled via FEATURES=jobserver-token, it causes emerge to acquire a job token for every job it starts, therefore:
1. emerge won't start more jobs than the jobserver specifies. For example, `steve -j12` will cap emerge at 12 jobs, even if you specify --jobs=16. However, lower cap for emerge will be respected, so you can leave a bunch of job tokens free for other processes to use.
2. emerge will share the job pool with other jobserver-enabled software such as GNU make or Ninja. When emerge is using up all 12 job tokens, all builders inside it will run serial. When it's running 6 jobs, all builders will be able to start up to 6 extra jobs, etc. Ideally, no more than 12 active jobs will be running at a time over the system.
3. Jobserver-enabled software will now correctly respect jobserver job count. When running with externally-provided jobserver, these tools assumed that the jobserver already acquired one token for them, and therefore ran one extra job without a token; say, 13 jobs for a single emerge process. Now the token is actually acquired, so the accounts will match.
Secondly, I've packaged dev-python/pytest-jobserver with a bunch of fixes to make it behave correctly and support Gentoo jobserver. We're not integrating it with the eclasses yet, but you can install it and force-enabled via EPYTEST_FLAGS="-p jobserver". With it, pytest-xdist will acquire job tokens while running tests, and therefore parallel #PyTest jobs will also be counted towards total job count.
Again, it's not a perfect solution, but it works reasonably. The plugin still starts -n jobs as specified by the arguments, but it acquired job tokens prior to executing every test, therefore delaying actual testing until tokens are available. It doesn't seem to cause noticeable overhead either.
Một kỹ sư QA thất nghiệp đang phát triển công cụ tạo test tự động. Anh ấy đề nghị viết miễn phí các bài test Pytest/Jest thủ công cho logic cốt lõi (không phải UI) từ kho mã nguồn GitHub của bạn. Mục đích là để hiểu các trường hợp biên mà dev quan tâm, giúp cải thiện công cụ của mình. Cơ hội tốt để có test chất lượng!
#QA #Testing #Pytest #Jest #SideProject #FreeService #KiểmThử #PhátTriểnPhầnMềm #DịchVụMiễnPhí
https://www.reddit.com/r/SideProject/comments/1peivny/im_an_unemployed_qa_engineer_b
Một kỹ sư QA thất nghiệp đang xây dựng công cụ tạo test tự động. Anh ấy đề nghị viết miễn phí các bài kiểm thử Pytest/Jest cho logic cốt lõi trong repo GitHub của bạn để hiểu rõ hơn về nhu cầu thực tế của nhà phát triển. Cơ hội tốt để có test miễn phí và giúp một side project!
#QA #Testing #Pytest #Jest #SideProject #FreeTests #KiểmThử #PhátTriểnPhầnMềm #DựÁnPhụ
https://www.reddit.com/r/SideProject/comments/1peivny/im_an_unemployed_qa_engineer_building_a_test/
"Disable network requests when running Pytest"
https://blog.pecar.me/disable-network-requets-when-running-pytest