Feature/eq method for default (#1789)

* Add changelog for #1707

* Add __eq__ and __hash__ methods to the Default class

* Add tests for the eq and hash methods to the TestDefault
This commit is contained in:
Aleksandr Zainulgabidinov 2026-04-04 01:24:34 +03:00 committed by GitHub
parent 9f49c0413f
commit 875f37f780
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 0 deletions

View file

@ -24,6 +24,15 @@ class TestDefault:
default = Default("test")
assert repr(default) == "<Default('test')>"
def test_eq_same_name(self):
assert Default("test") == Default("test")
def test_eq_different_name(self):
assert Default("foo") != Default("bar")
def test_hash(self):
assert hash(Default("test")) == hash(Default("test"))
class TestDefaultBotProperties:
def test_post_init_empty(self):