fix: Reintroduce removed tests

This commit is contained in:
Gonzalo Martinez 2025-01-07 14:54:18 -08:00
parent a3bca549c8
commit 2d2b8f3016
5 changed files with 15 additions and 0 deletions

View File

@ -35,6 +35,9 @@ kwargs4: Dict[str, Any] = provider4.kwargs
# Test 5: to check the provided instance interface # Test 5: to check the provided instance interface
provider5 = providers.Callable(Animal) provider5 = providers.Callable(Animal)
provided5: Animal = provider5.provided() provided5: Animal = provider5.provided()
attr_getter5: providers.AttributeGetter = provider5.provided.attr
item_getter5: providers.ItemGetter = provider5.provided["item"]
method_caller: providers.MethodCaller = provider5.provided.method.call(123, arg=324)
# Test 6: to check the DelegatedCallable # Test 6: to check the DelegatedCallable
provider6 = providers.DelegatedCallable(Cat) provider6 = providers.DelegatedCallable(Cat)

View File

@ -38,6 +38,9 @@ attributes4: Dict[str, Any] = provider4.attributes
# Test 5: to check the provided instance interface # Test 5: to check the provided instance interface
provider5 = providers.Factory(Animal) provider5 = providers.Factory(Animal)
provided5: Animal = provider5.provided() provided5: Animal = provider5.provided()
attr_getter5: providers.AttributeGetter = provider5.provided.attr
item_getter5: providers.ItemGetter = provider5.provided["item"]
method_caller5: providers.MethodCaller = provider5.provided.method.call(123, arg=324)
# Test 6: to check the DelegatedFactory # Test 6: to check the DelegatedFactory
provider6 = providers.DelegatedFactory(Cat) provider6 = providers.DelegatedFactory(Cat)

View File

@ -24,6 +24,9 @@ provider3 = providers.List(
providers.Factory(object), providers.Factory(object),
) )
provided3: List[Any] = provider3.provided() provided3: List[Any] = provider3.provided()
attr_getter3: providers.AttributeGetter = provider3.provided.attr
item_getter3: providers.ItemGetter = provider3.provided["item"]
method_caller3: providers.MethodCaller = provider3.provided.method.call(123, arg=324)
# Test 4: to check the return type with await # Test 4: to check the return type with await
provider4 = providers.List( provider4 = providers.List(

View File

@ -10,6 +10,9 @@ var1: int = provider1()
# Test 2: to check the provided instance interface # Test 2: to check the provided instance interface
provider2 = providers.Object(int) provider2 = providers.Object(int)
provided2: Type[int] = provider2.provided() provided2: Type[int] = provider2.provided()
attr_getter2: providers.AttributeGetter = provider2.provided.attr
item_getter2: providers.ItemGetter = provider2.provided["item"]
method_caller2: providers.MethodCaller = provider2.provided.method.call(123, arg=324)
# Test 3: to check the return type with await # Test 3: to check the return type with await
provider3 = providers.Object(int(3)) provider3 = providers.Object(int(3))

View File

@ -38,6 +38,9 @@ attributes4: Dict[str, Any] = provider4.attributes
# Test 5: to check the provided instance interface # Test 5: to check the provided instance interface
provider5 = providers.Singleton(Animal) provider5 = providers.Singleton(Animal)
provided5: Animal = provider5.provided() provided5: Animal = provider5.provided()
attr_getter5: providers.AttributeGetter = provider5.provided.attr
item_getter5: providers.ItemGetter = provider5.provided["item"]
method_caller5: providers.MethodCaller = provider5.provided.method.call(123, arg=324)
# Test 6: to check the DelegatedSingleton # Test 6: to check the DelegatedSingleton
provider6 = providers.DelegatedSingleton(Cat) provider6 = providers.DelegatedSingleton(Cat)