diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-06-12 10:37:21 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-06-12 10:37:21 -0400 |
commit | db5409ca22c392f249997aca21a398d3f7358a81 (patch) | |
tree | 0e284430a83ef56b251cbaef8af574c4f5efca29 /lab | |
parent | ef46cecdcc9d529c81f84e8e71c9331b44f92b96 (diff) | |
download | python-coveragepy-git-db5409ca22c392f249997aca21a398d3f7358a81.tar.gz |
An example of using aspectlib to debug how people are calling coverage
Diffstat (limited to 'lab')
-rw-r--r-- | lab/aspectlib.diff | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lab/aspectlib.diff b/lab/aspectlib.diff new file mode 100644 index 00000000..5e4ea6ec --- /dev/null +++ b/lab/aspectlib.diff @@ -0,0 +1,14 @@ +diff -r 44af4372756b coverage/__init__.py +--- a/coverage/__init__.py Sat Nov 21 14:26:51 2015 -0500 ++++ b/coverage/__init__.py Sun Nov 22 08:18:04 2015 -0500 +@@ -18,6 +18,10 @@ + # Backward compatibility. + coverage = Coverage + ++if 1: ++ import aspectlib, aspectlib.debug, sys ++ aspectlib.weave(Coverage, aspectlib.debug.log(print_to=sys.stdout), methods=aspectlib.PUBLIC_METHODS) ++ + # On Windows, we encode and decode deep enough that something goes wrong and + # the encodings.utf_8 module is loaded and then unloaded, I don't know why. + # Adding a reference here prevents it from being unloaded. Yuk. |