-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Labels
⚙️ testsaffected functionality: testsaffected functionality: tests
Description
Our test suite has once again degraded in performance and flakiness has been reintroduced. We can experiment / make our test suite better in different ways, some of my current ideas are listed roughly below:
- Try to make everything as concurrent as possible (Make network based tests as concurrent as possible #4271)
- Profile all tests and see what clogs up and fix that.
- solve the TODO in
test_official.exceptions - refactor
test_sticker.pysince sticker sets can now hold static, animated, and video altogether. #4514 -
dirty-equalssounds like it could be quite useful for us! - Think about renaming the
Test*Baseclasses to just*Basesince pytest collects the classes starting withTest*. Rename Testing Base Classes #4453 - Change CI's pytest
--disttoworkstealUpdatepytest-xdistUsage #4491 . - Extend that naming scheme to
telegram.exttests - fix the class name Rename Testing Base Classes #4453
class TestMenuButtonselfBase:
Follow https://github.com/zupo/awesome-pytest-speedup, not all items but some are worth looking at:
- Introduce
pytest-socketand completely disable network access for*WithoutRequesttests (PoC:pytest-socketlike testing #4317, Make Tests fortelegram.extIndependent of Networking #4454) -
Introduce(no major benefit found - Make network based tests as concurrent as possible #4271 (comment))pyfakefsto test suite - Check if using
uvloopin tests provides any measurable speed up. - Isolate tests from other tests
- Check if introducing
pytest-randomly(need to check if pytest-xdist effectively does the job of randomly)
-> Check if using pytest-asyncio-cooperative is worth it
- Nope it is not.
Sub-issues
Metadata
Metadata
Assignees
Labels
⚙️ testsaffected functionality: testsaffected functionality: tests