aiogram/tests
darksidecat bc5b26de5f
Add __eq__ and __hash__ methods to State class (#928)
* Fix the ability to copy the state, now copying the state will return the same state.

* reformat

* full implement deepcopy with memo dict, add typehints

* Update aiogram/dispatcher/fsm/state.py

Co-authored-by: Oleg A. <t0rr@mail.ru>

* update tests

Co-authored-by: Oleg A. <t0rr@mail.ru>

* remove deepcopy in tests

Co-authored-by: Oleg A. <t0rr@mail.ru>

* remove deepcopy method

Co-authored-by: Oleg A. <t0rr@mail.ru>

* update changes description

Co-authored-by: Oleg A. <t0rr@mail.ru>

* update __eq__  method

Co-authored-by: Oleg A. <t0rr@mail.ru>

* add typehints, tests

* return False for not equal objects
creating FilterObject use getfullargspec that check State equality with `type` and `object` builtins, raising Error in `__eq__` method of State break this behavior

* return NotImplemented for other types

* use `!=` instead of 'not x == y' in tests

Co-authored-by: Oleg A. <t0rr@mail.ru>
2022-07-08 02:26:49 +03:00
..
data/locales Dev 3.x i18n & improvements (#696) 2021-09-22 00:52:38 +03:00
test_api Add full_name shortcut for Chat (#929) 2022-06-26 01:50:27 +03:00
test_dispatcher Add __eq__ and __hash__ methods to State class (#928) 2022-07-08 02:26:49 +03:00
test_utils #896 Restrict including routers with strings (#897) 2022-04-25 21:24:58 +03:00
__init__.py Update tests and small refactoring 2019-11-16 22:32:26 +02:00
conftest.py Beta 3 (#884) 2022-04-16 19:07:32 +03:00
deprecated.py Upgrade architecture + 5.0 Bot API (#469) 2021-01-26 21:20:52 +02:00
docker-compose.yml Backport and improvements (#601) 2021-06-15 01:45:31 +03:00
mocked_bot.py Webhook integration in 3.0 (#737) 2021-11-08 23:20:12 +02:00