mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-07-04 12:23:14 +03:00
Update doc blocks and imports
This commit is contained in:
parent
f85b761607
commit
1377432eec
|
@ -1 +1 @@
|
|||
"""Dependency injector providers unit tests."""
|
||||
"""Providers tests."""
|
||||
|
|
|
@ -112,8 +112,6 @@ def test_as_(config):
|
|||
assert value == decimal.Decimal("123.123")
|
||||
|
||||
|
||||
# TODO: do we really need to skip it?
|
||||
# @unittest.skipIf(sys.version_info[:2] == (2, 7), "Python 2.7 does not support this assert")
|
||||
def test_required(config):
|
||||
provider = providers.Callable(
|
||||
lambda value: value,
|
||||
|
@ -233,16 +231,12 @@ def test_value_of_undefined_option(config):
|
|||
assert config.option() is None
|
||||
|
||||
|
||||
# TODO: do we really need to skip it?
|
||||
# @unittest.skipIf(sys.version_info[:2] == (2, 7), "Python 2.7 does not support this assert")
|
||||
@mark.parametrize("config_type", ["strict"])
|
||||
def test_value_of_undefined_option_in_strict_mode(config):
|
||||
with raises(errors.Error, match="Undefined configuration option \"config.option\""):
|
||||
config.option()
|
||||
|
||||
|
||||
# TODO: do we really need to skip it?
|
||||
# @unittest.skipIf(sys.version_info[:2] == (2, 7), "Python 2.7 does not support this assert")
|
||||
@mark.parametrize("config_type", ["strict"])
|
||||
def test_value_of_undefined_option_with_root_none_in_strict_mode(config):
|
||||
config.override(None)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
import copy
|
||||
|
||||
import unittest
|
||||
|
||||
from dependency_injector import containers, providers, errors
|
||||
from pytest import raises
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
"""Provider utils unit tests."""
|
||||
"""Provider utils tests."""
|
||||
|
||||
from dependency_injector import providers, errors
|
||||
from pytest import raises
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
"""Provider utils unit tests."""
|
||||
"""Provider utils tests."""
|
||||
|
||||
from dependency_injector import providers
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user