From 40afb614572d0d9eb2625835c8b6426c3446375f Mon Sep 17 00:00:00 2001 From: Sanhe Date: Sat, 30 Dec 2023 15:02:30 -0500 Subject: [PATCH] fix doc --- readthedocs.yml | 13 ------------- tests/test_ib_with_validator.py | 6 ++++++ tests/test_nesting.py | 4 ++-- 3 files changed, 8 insertions(+), 15 deletions(-) delete mode 100644 readthedocs.yml diff --git a/readthedocs.yml b/readthedocs.yml deleted file mode 100644 index 4d45f39..0000000 --- a/readthedocs.yml +++ /dev/null @@ -1,13 +0,0 @@ -version: 2 - -build: - os: ubuntu-20.04 - tools: - python: "3.8" - -python: - install: - - method: pip - path: . - extra_requirements: - - docs diff --git a/tests/test_ib_with_validator.py b/tests/test_ib_with_validator.py index 8780202..d7fd451 100644 --- a/tests/test_ib_with_validator.py +++ b/tests/test_ib_with_validator.py @@ -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() @@ -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 diff --git a/tests/test_nesting.py b/tests/test_nesting.py index e529ad3..a0a3755 100644 --- a/tests/test_nesting.py +++ b/tests/test_nesting.py @@ -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, @@ -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,