Skip to content

Commit 466139b

Browse files
committed
fix: Fix tests for python 2.7
1 parent 69ff648 commit 466139b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_typing.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# This is test file for typing,
22
# No automatic testing is used at the moment. Just use your type checker and see if it works.
33
# Pytest here is used to make sure that runtime behavir matches with type checker expecter errors.
4-
from decopatch import DECORATED, function_decorator
4+
from typing import Any, Callable
5+
56
import pytest
67

8+
from decopatch import DECORATED, function_decorator
9+
710

811
def test_invalid_parameter():
912
with pytest.raises(TypeError):
@@ -15,7 +18,7 @@ def decorator_wint_invalid_param(fn=DECORATED):
1518

1619
def test_normal_decorator():
1720
@function_decorator
18-
def decorator(scope: str = "test", fn=DECORATED):
21+
def decorator(scope="test", fn=DECORATED): # type: (str, Any) -> Callable[..., Any]
1922
assert isinstance(scope, str)
2023
return fn
2124

0 commit comments

Comments
 (0)