Skip to content

Commit e6933fa

Browse files
matmelTinche
authored andcommitted
Document the test
1 parent 62cdb58 commit e6933fa

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/strategies/test_include_subclasses.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
from typing import Any
77

88
import pytest
9-
from attrs import define, has, frozen
9+
from attrs import define, frozen, has
1010

1111
from cattrs import Converter, override
12-
from cattrs.gen import make_dict_structure_fn
1312
from cattrs.errors import ClassValidationError, StructureHandlerNotFoundError
13+
from cattrs.gen import make_dict_structure_fn
1414
from cattrs.strategies import configure_tagged_union, include_subclasses
1515

1616
from .._compat import is_py311_plus
@@ -540,6 +540,11 @@ class Sub(Mid1, Mid2):
540540

541541

542542
def test_subclasses_in_struct_factory():
543+
"""
544+
Check the structuring does not fail with an attribute error when include_subclasses
545+
is called within a structure_hook_factory on a complex class tree involving
546+
subclasses several levels deep (#721)
547+
"""
543548

544549
@frozen
545550
class SubA:

0 commit comments

Comments
 (0)