Skip to content

Commit

Permalink
feat: pytest-cov (#96)
Browse files Browse the repository at this point in the history
* fix: attribute error case for unnamed wrapped fn

* feat: pytest-cov
  • Loading branch information
BobTheBuidler authored Oct 25, 2023
1 parent b6c8da4 commit a4c9653
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Binary file added .coverage
Binary file not shown.
3 changes: 2 additions & 1 deletion a_sync/modified.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ def __init__(self, fn: SyncFn[P, T], **modifiers: Unpack[ModifierKwargs]) -> Non
def __init__(self, fn: AnyFn[P, T], **modifiers: Unpack[ModifierKwargs]) -> None:
_helpers._validate_wrapped_fn(fn)
self.modifiers = ModifierManager(**modifiers)
self.__name__ = fn.__name__
self.__wrapped__ = fn
if hasattr(self.__wrapped__, '__name__'):
self.__name__ = self.__wrapped__.__name__

@overload
def __call__(self, *args: P.args, sync: Literal[True] = True, **kwargs: P.kwargs) -> T:...
Expand Down
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pytest-asyncio-cooperative
pytest-asyncio-cooperative
pytest-cov

0 comments on commit a4c9653

Please sign in to comment.