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:
Follow https://github.com/zupo/awesome-pytest-speedup, not all items but some are worth looking at:
-> Check if using pytest-asyncio-cooperative is worth it
- Nope it is not.
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:
test_official.exceptionstest_sticker.pysince sticker sets can now hold static, animated, and video altogether. #4514dirty-equalssounds like it could be quite useful for us!Test*Baseclasses to just*Basesince pytest collects the classes starting withTest*. Rename Testing Base Classes #4453--disttoworkstealUpdatepytest-xdistUsage #4491 .telegram.exttestspython-telegram-bot/tests/test_menubutton.py
Line 94 in 51ef571
Follow https://github.com/zupo/awesome-pytest-speedup, not all items but some are worth looking at:
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 suiteuvloopin tests provides any measurable speed up.pytest-randomly(need to check if pytest-xdist effectively does the job of randomly)-> Check if using
pytest-asyncio-cooperativeis worth it- Nope it is not.