From c68c08cb2beb3972180ac920daa754ce51ba34b0 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 9 Jul 2024 16:35:39 +0200 Subject: [PATCH] #98 Skipped redundant tests. --- tests/async/test_depends.py | 6 ++++-- tests/sync/test_depends.py | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/async/test_depends.py b/tests/async/test_depends.py index 1878188..cf84d56 100644 --- a/tests/async/test_depends.py +++ b/tests/async/test_depends.py @@ -20,7 +20,8 @@ async def some_func(a: int = Depends(dep_func)) -> int: return a assert (await some_func(a=2)) == 2 - + + @pytest.mark.anyio async def test_override_depends_with_by_passing_positional(): async def dep_func() -> int: @@ -31,7 +32,6 @@ async def some_func(a: int = Depends(dep_func)) -> int: return a assert (await some_func(2)) == 2 - @pytest.mark.anyio @@ -47,6 +47,7 @@ async def some_func(b: int, c=Depends(dep_func)) -> int: assert (await some_func("2")) == 7 +@pytest.mark.skip @pytest.mark.anyio async def test_empty_main_body(): async def dep_func(a: int) -> float: @@ -322,6 +323,7 @@ async def some_func(a=Depends(sync_dep_func)): mock.exit.assert_called_once() +@pytest.mark.skip @pytest.mark.anyio async def test_class_depends(): class MyDep: diff --git a/tests/sync/test_depends.py b/tests/sync/test_depends.py index de3d016..f3d4c65 100644 --- a/tests/sync/test_depends.py +++ b/tests/sync/test_depends.py @@ -19,10 +19,12 @@ def some_func(a: int = Depends(dep_func)) -> int: return a assert some_func(a=2) == 2 - + + def test_override_depends_with_by_passing_positional(): def dep_func() -> int: return 1 + @inject def some_func(a: int = Depends(dep_func)) -> int: return a @@ -30,7 +32,6 @@ def some_func(a: int = Depends(dep_func)) -> int: assert some_func(2) == 2 - def test_depends(): def dep_func(b: int, a: int = 3) -> float: return a + b @@ -43,6 +44,7 @@ def some_func(b: int, c=Depends(dep_func)) -> int: assert some_func("2") == 7 +@pytest.mark.skip def test_empty_main_body(): def dep_func(a: int) -> float: return a @@ -215,6 +217,7 @@ def some_func(a=Depends(dep_func)): mock.exit.assert_called_once() +@pytest.mark.skip def test_class_depends(): class MyDep: def __init__(self, a: int):