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.""" """Callable provider tests."""
import decimal
import sys import sys
from dependency_injector import providers, errors from dependency_injector import providers, errors
@ -33,7 +34,7 @@ def test_set_provides_returns_():
"str_name,cls", "str_name,cls",
[ [
("dependency_injector.providers.Factory", providers.Factory), ("dependency_injector.providers.Factory", providers.Factory),
("builtins.list", list), ("decimal.Decimal", decimal.Decimal),
("list", list), ("list", list),
(".common.example", example), (".common.example", example),
("test_is_provider", test_is_provider), ("test_is_provider", test_is_provider),

View File

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

View File

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

View File

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