Тестирование на pytest
pytest — ближе по духу к языку Python нежели unittest, которая накладывает определенные обязательства при разработке тестов. Например, создание классов-наследников от TestCase или выполнение определенной процедуры запуска тестов.
Но при разработке на pytest ничего этого делать не нужно. Вы просто пишете функции, которые должны начинаться с "test_" и используете assert, встроенные в Python.
Также он поддерживает запуск тестов на unittest и nose, то есть полная обратная совместимость с ними.
#python#pytest#assert
📰 New Python Backdoor Uses Tunneling Service to Steal Browser and Cloud Credentials
Cybersecurity researchers have disclosed details of a stealthy Python-based backdoor framework called DEEP#DOOR that comes with capabilities to establish persistent access and harvest a wide range of sensitive information from compromised hosts."The intrusion chain begins with execution of a batch script ('install_obf.bat') that disables Windows security controls, dynamically extracts an.
🔗 Source: https://thehackernews.com/2026/04/new-python-backdoor-uses-tunneling.html
#python
📰 PyPI package with 1.1M monthly downloads hacked to push infostealer
An attacker pushed a malicious version of the popular elementary-data package Python Package Index (PyPI) to steal sensitive developer data and cryptocurrency wallets.
🔗 Source: https://www.bleepingcomputer.com/news/security/pypi-package-with-11m-monthly-downloads-hacked-to-push-infostealer/
#python
🖥
Tip: You can use functools.reduce() in #Python to apply a function to all elements of the iterable set.
-----
Main channel: @repo_science
Coupons: @freecoupons_reposcience
-----
#Python
🖥
Test your typing knowledge in Python
Cool free project Python Type Challenger is a quiz where you have to write code. A good way to remember the basics of type hints (dictionaries, variables, return) and drill into the depths of the typing ocean (recursive, decorators, constructors, etc.).
🔗Link
-----
Main channel: @repo_science
Coupons: @freecoupons_reposcience
-----