generated from BrianPugh/python-template
-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from BrianPugh/codecov
Fix Double Responses
- Loading branch information
Showing
10 changed files
with
228 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,6 @@ | ||
import os, sys | ||
def __belay(name): | ||
def inner(f): | ||
def func_wrapper(*args, **kwargs): | ||
res = f(*args, **kwargs) | ||
print("_BELAYR" + repr(res)) | ||
return res | ||
def gen_wrapper(*args, **kwargs): | ||
send_val = None | ||
gen = f(*args, **kwargs) | ||
try: | ||
while True: | ||
res = gen.send(send_val) | ||
print("_BELAYR" + repr(res)) | ||
send_val = yield res | ||
except StopIteration: | ||
pass | ||
globals()["_belay_" + name] = gen_wrapper if isinstance(f, type(lambda: (yield))) else func_wrapper | ||
return f | ||
return inner | ||
def __belay_gen_next(x, val): | ||
def __belay_next(x, val): | ||
try: | ||
x.send(val) | ||
return x.send(val) | ||
except StopIteration: | ||
print("_BELAYS") |
Oops, something went wrong.