Skip to content

Commit 806bedb

Browse files
remove redundant tests
1 parent c8be671 commit 806bedb

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

tests/unit/providers/resource/test_context_local_resource_py38.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ def test_set_provides_returns_():
4141
],
4242
)
4343
def test_set_provides_string_imports(str_name, cls):
44-
print( providers.ContextLocalResource(str_name).provides)
45-
print(cls)
4644
assert providers.ContextLocalResource(str_name).provides is cls
4745

4846

@@ -220,38 +218,6 @@ def shutdown(self, _):
220218
assert TestResource.shutdown_counter == 2
221219

222220

223-
def test_init_class_generic_typing():
224-
# See issue: https://github.com/ets-labs/python-dependency-injector/issues/488
225-
class TestDependency:
226-
...
227-
228-
class TestResource(resources.Resource[TestDependency]):
229-
def init(self, *args: Any, **kwargs: Any) -> TestDependency:
230-
return TestDependency()
231-
232-
def shutdown(self, resource: TestDependency) -> None: ...
233-
234-
assert issubclass(TestResource, resources.Resource) is True
235-
236-
237-
def test_init_class_abc_init_definition_is_required():
238-
class TestResource(resources.Resource):
239-
...
240-
241-
with raises(TypeError) as context:
242-
TestResource()
243-
244-
assert "Can't instantiate abstract class TestResource" in str(context.value)
245-
assert "init" in str(context.value)
246-
247-
248-
def test_init_class_abc_shutdown_definition_is_not_required():
249-
class TestResource(resources.Resource):
250-
def init(self):
251-
...
252-
253-
assert hasattr(TestResource(), "shutdown") is True
254-
255221

256222
def test_init_not_callable():
257223
provider = providers.ContextLocalResource(1)

0 commit comments

Comments
 (0)