Skip to content

Commit

Permalink
Lancetnik#98 Skipped redundant tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander committed Jul 9, 2024
1 parent 15fdb62 commit c68c08c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions tests/async/test_depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
7 changes: 5 additions & 2 deletions tests/sync/test_depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,19 @@ 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

assert some_func(2) == 2



def test_depends():
def dep_func(b: int, a: int = 3) -> float:
return a + b
Expand All @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit c68c08c

Please sign in to comment.