Skip to content

Commit

Permalink
fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
MacHu-GWU committed Dec 30, 2023
1 parent fb989aa commit 40afb61
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
13 changes: 0 additions & 13 deletions readthedocs.yml

This file was deleted.

6 changes: 6 additions & 0 deletions tests/test_ib_with_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,16 @@ class Data(AttrsClass):
ib_tuple = AttrsClass.ib_tuple()
ib_set = AttrsClass.ib_set()
ib_dict = AttrsClass.ib_dict()
ib_user_list = AttrsClass.ib_list_of_generic(User)
ib_user_mapper = AttrsClass.ib_dict_of_generic(key_type=str, value_type=User)

data = Data(
ib_list=[1, 2],
ib_tuple=(1, 2),
ib_set={1, 2},
ib_dict={"a": 1, "b": 2},
ib_user_list=[User(), User()],
ib_user_mapper={"a": User(), "b": User()},
)
invalid = Invalid()

Expand All @@ -112,6 +116,8 @@ class Data(AttrsClass):
ib_tuple=None,
ib_set=None,
ib_dict=None,
ib_user_list=None,
ib_user_mapper=None,
)

# None is NOT OK
Expand Down
4 changes: 2 additions & 2 deletions tests/test_nesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class People(AttrsClass):
class TestNesting:
def test_from_dict1(self):
"""
nested value is dict.
constructor data is generic dict
"""
people = People(
id=1,
Expand All @@ -58,7 +58,7 @@ def test_from_dict1(self):

def test_from_dict2(self):
"""
nested value is already object
constructor data is already object
"""
people = People(
id=1,
Expand Down

0 comments on commit 40afb61

Please sign in to comment.