@@ -47,10 +47,10 @@ def test_functions_iter(self, parser_with_function_test, parser_with_static_meth
47
47
assert parser_with_function_test .functions ().names == ["test" ]
48
48
49
49
def test_attributes_iter (self , parser_with_attr_title , parser_with_static_method ):
50
- assert len (BaseParser .attributes ()) == 0
51
- assert len (parser_with_static_method .attributes ()) == 0
52
- assert len (parser_with_attr_title .attributes ()) == 1
53
- assert parser_with_attr_title .attributes ().names == ["title" ]
50
+ assert len (BaseParser .attributes ()) == 1
51
+ assert len (parser_with_static_method .attributes ()) == 1
52
+ assert len (parser_with_attr_title .attributes ()) == 2
53
+ assert parser_with_attr_title .attributes ().names == ["free_access" , " title" ]
54
54
55
55
def test_supported_unsupported (self ):
56
56
class ParserWithValidatedAndUnvalidated (BaseParser ):
@@ -63,12 +63,12 @@ def unvalidated(self) -> str:
63
63
return "unsupported"
64
64
65
65
parser = ParserWithValidatedAndUnvalidated ()
66
- assert len (parser .attributes ()) == 2
66
+ assert len (parser .attributes ()) == 3
67
67
68
68
assert (validated := parser .attributes ().validated )
69
69
assert isinstance (validated , AttributeCollection )
70
70
assert (funcs := list (validated )) != [parser .validated ]
71
- assert funcs [0 ].__func__ == parser .validated .__func__
71
+ assert funcs [1 ].__func__ == parser .validated .__func__
72
72
73
73
assert (unvalidated := parser .attributes ().unvalidated )
74
74
assert isinstance (validated , AttributeCollection )
0 commit comments