diff options
author | 2022-08-08 20:26:03 +0300 | |
---|---|---|
committer | 2022-08-08 20:29:55 +0300 | |
commit | 55096f33b698380d29bbd4ef1802d9d43bda86d8 (patch) | |
tree | 07c46849365540cf09f06c294f8463814e62e685 /tests | |
parent | test/mixins: (py3.11) fix invalid call to __subclasses__ (diff) | |
download | snakeoil-55096f33b698380d29bbd4ef1802d9d43bda86d8.tar.gz snakeoil-55096f33b698380d29bbd4ef1802d9d43bda86d8.tar.bz2 snakeoil-55096f33b698380d29bbd4ef1802d9d43bda86d8.zip |
test_obj.py: (py3.11) add __getstate__ to knowledge
In python 3.11, the function `object.__getstate__()` was added, so we
should add it to the ignore list.
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_obj.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_obj.py b/tests/test_obj.py index ef9ee4c..83f9f77 100644 --- a/tests/test_obj.py +++ b/tests/test_obj.py @@ -22,8 +22,8 @@ class TestDelayedInstantiation: def assertKls(cls, ignores=(), default_ignores=("__new__", "__init__", "__init_subclass__", "__getattribute__", "__class__", - "__getnewargs__", "__doc__", - "__class_getitem__")): + "__getnewargs__", "__getstate__", + "__doc__", "__class_getitem__")): required = set(x for x in dir(cls) if x.startswith("__") and x.endswith("__")) missing = required.difference(obj.kls_descriptors) @@ -43,8 +43,8 @@ class TestDelayedInstantiation: def test_BaseDelayedObject(self): # assert that all methods/descriptors of object # are covered via the base. - o = set(dir(object)).difference("__%s__" % x for x in [ - "class", "getattribute", "new", "init", "init_subclass", "doc"]) + o = set(dir(object)).difference(f"__{x}__" for x in ( + "class", "getattribute", "new", "init", "init_subclass", "getstate", "doc")) diff = o.difference(obj.base_kls_descriptors) assert not diff, ("base delayed instantiation class should cover all of object, but " "%r was spotted" % (",".join(sorted(diff)),)) |