Update doc blocks and imports

This commit is contained in:
Roman Mogylatov 2021-10-18 14:56:37 -04:00
parent f85b761607
commit 1377432eec
5 changed files with 3 additions and 11 deletions

View File

@ -1 +1 @@
"""Dependency injector providers unit tests."""
"""Providers tests."""

View File

@ -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)

View File

@ -2,8 +2,6 @@
import copy
import unittest
from dependency_injector import containers, providers, errors
from pytest import raises

View File

@ -1,4 +1,4 @@
"""Provider utils unit tests."""
"""Provider utils tests."""
from dependency_injector import providers, errors
from pytest import raises

View File

@ -1,4 +1,4 @@
"""Provider utils unit tests."""
"""Provider utils tests."""
from dependency_injector import providers