Update tests to pass on Python 2

This commit is contained in:
Roman Mogylatov 2022-01-29 22:57:54 -05:00
parent ddf1eb29e8
commit 109dd8b761
4 changed files with 8 additions and 5 deletions

View File

@ -1,5 +1,6 @@
"""Callable provider tests."""
import decimal
import sys
from dependency_injector import providers, errors
@ -33,7 +34,7 @@ def test_set_provides_returns_():
"str_name,cls",
[
("dependency_injector.providers.Factory", providers.Factory),
("builtins.list", list),
("decimal.Decimal", decimal.Decimal),
("list", list),
(".common.example", example),
("test_is_provider", test_is_provider),

View File

@ -1,5 +1,6 @@
"""Factory provider tests."""
import decimal
import sys
from dependency_injector import providers, errors
@ -33,7 +34,7 @@ def test_set_provides_returns_():
"str_name,cls",
[
("dependency_injector.providers.Factory", providers.Factory),
("builtins.list", list),
("decimal.Decimal", decimal.Decimal),
("list", list),
(".common.Example", Example),
("test_is_provider", test_is_provider),

View File

@ -1,5 +1,6 @@
"""Resource provider tests."""
import decimal
import sys
from typing import Any
@ -31,7 +32,7 @@ def test_set_provides_returns_():
"str_name,cls",
[
("dependency_injector.providers.Factory", providers.Factory),
("builtins.list", list),
("decimal.Decimal", decimal.Decimal),
("list", list),
(".test_resource_py35.test_is_provider", test_is_provider),
("test_is_provider", test_is_provider),

View File

@ -1,5 +1,5 @@
"""Singleton provider tests."""
import decimal
import sys
from dependency_injector import providers, errors
@ -53,7 +53,7 @@ def test_set_provides_returns_self(provider):
"str_name,cls",
[
("dependency_injector.providers.Factory", providers.Factory),
("builtins.list", list),
("decimal.Decimal", decimal.Decimal),
("list", list),
(".common.Example", Example),
("test_is_provider", test_is_provider),