mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 09:36:48 +03:00
Move generic types test to separate module
This commit is contained in:
parent
d8439a28b1
commit
39368591b9
|
@ -139,11 +139,6 @@ class ProviderTests(unittest.TestCase):
|
|||
self.assertIsNot(overriding_provider, overriding_provider_copy)
|
||||
self.assertIsInstance(overriding_provider_copy, providers.Provider)
|
||||
|
||||
def test_generic_type(self):
|
||||
provider: providers.Provider[object] = providers.Factory(object)
|
||||
some_object = provider()
|
||||
self.assertIsInstance(some_object, object)
|
||||
|
||||
def test_repr(self):
|
||||
self.assertEqual(repr(self.provider),
|
||||
'<dependency_injector.providers.'
|
||||
|
|
15
tests/unit/providers/test_types_py36.py
Normal file
15
tests/unit/providers/test_types_py36.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
import unittest
|
||||
|
||||
from dependency_injector import providers
|
||||
|
||||
|
||||
class SomeClass:
|
||||
...
|
||||
|
||||
|
||||
class TypesTest(unittest.TestCase):
|
||||
|
||||
def test_provider(self):
|
||||
provider: providers.Provider[SomeClass] = providers.Factory(SomeClass)
|
||||
some_object = provider()
|
||||
self.assertIsInstance(some_object, SomeClass)
|
Loading…
Reference in New Issue
Block a user