mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-07-17 11:32:21 +03:00
Set absolute import mode for the providers module and add types module test
This commit is contained in:
parent
a2fb095e69
commit
6d4e9240ea
File diff suppressed because it is too large
Load Diff
|
@ -3,6 +3,8 @@
|
|||
Powered by Cython.
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import copy
|
||||
import os
|
||||
import re
|
||||
|
|
15
tests/unit/providers/test_types_py35.py
Normal file
15
tests/unit/providers/test_types_py35.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
import unittest
|
||||
|
||||
from dependency_injector import providers, types
|
||||
|
||||
|
||||
class SomeClass:
|
||||
...
|
||||
|
||||
|
||||
class TypesTest(unittest.TestCase):
|
||||
|
||||
def test_provider(self):
|
||||
provider: types.Provider[SomeClass] = providers.Factory(SomeClass)
|
||||
some_object = provider()
|
||||
self.assertIsInstance(some_object, SomeClass)
|
Loading…
Reference in New Issue
Block a user