added 9 commits
December 16, 2022 02:50This commit additionally changes: - The scope of the fixtures to module - Class variables are moved into a namespace class called as Space - Auto addition of flaky and no_req marker (in conftest.py) - Caching of default and tz bots (in conftest.py) Apart from this, no tests were added/deleted/modified in any way.
This mainly does two things: - Leverages the session bot while making new applications, this eliminates all calls to get_me - `test_signal_handler` was optimized to use `loop.call_later` which eliminates the chance where we could get a TaskException not retrieved error, which often fatally crash pytest. These two changes thus reduce flakyness and improves speed.
This was done as when running pytest with -x, this error is emitted. Not doing this seems to fix the problem. However this could backfire on python versions older than 3.10.6
includes removing unused params, removing unnecessary monkeypatch.delattr's, missing import, beautification, etc
…llback tests This means we can now move those methods back to TestBotNoReq, since they did not make any request apart from delete_webhook()
The tests are roughly arranged as follows: - test_slot_behaviour - test de_json/to_dict - test init - test equality - test wrong init - etc