Skip to content

Commit

Permalink
Skip coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangb committed Sep 30, 2021
1 parent 52bd5b5 commit 9a84a40
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "di"
version = "0.4.5"
version = "0.4.6"
description = "Autowiring dependency injection"
authors = ["Adrian Garcia Badaracco <[email protected]>"]
readme = "README.md"
Expand Down
22 changes: 16 additions & 6 deletions tests/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ def collector(one: None = Depends(dep1_reraise)) -> None:
except MyException:
pass
else:
raise AssertionError("MyException should have been re-raised")
raise AssertionError(
"MyException should have been re-raised"
) # pragma: no cover
assert rec.caught == {"dep1_reraise": True}


Expand All @@ -173,7 +175,9 @@ def collector(one: None = Depends(async_dep1_reraise)) -> None:
except MyException:
pass
else:
raise AssertionError("MyException should have been re-raised")
raise AssertionError(
"MyException should have been re-raised"
) # pragma: no cover
assert rec.caught == {"async_dep1_reraise": True}


Expand All @@ -191,7 +195,9 @@ def collector(
except MyException:
pass
else:
raise AssertionError("MyException should have been re-raised")
raise AssertionError(
"MyException should have been re-raised"
) # pragma: no cover
assert rec.caught == {"dep1_reraise": True, "dep2_reraise": True}


Expand All @@ -210,7 +216,9 @@ def collector(
except MyException:
pass
else:
raise AssertionError("MyException should have been re-raised")
raise AssertionError(
"MyException should have been re-raised"
) # pragma: no cover
assert rec.caught == {"async_dep1_reraise": True, "async_dep2_reraise": True}


Expand All @@ -229,7 +237,9 @@ def collector(
except MyException:
pass
else:
raise AssertionError("MyException should have been re-raised")
raise AssertionError(
"MyException should have been re-raised"
) # pragma: no cover
assert rec.caught == {"async_dep1_reraise": True, "dep2_reraise": True}


Expand All @@ -240,7 +250,7 @@ def leaf() -> Generator[None, None, None]:
except MyException:
pass
else:
raise AssertionError("Exception did not propagate")
raise AssertionError("Exception did not propagate") # pragma: no cover

def parent(child: None = Depends(leaf)) -> Generator[None, None, None]:
try:
Expand Down

0 comments on commit 9a84a40

Please sign in to comment.