-
Notifications
You must be signed in to change notification settings - Fork 952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Ansible zipped source files #226
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks good to me. Can you add a test for the functionality?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, left one inline comment. Also, there should be a test for the actual usage (extracting source from the zip file).
I added the test cases and changed the string/None handling. Please take a look to the changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good tests, quite extensive.
You've got some long lines, please cut lines so no line is longer than 100 characters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job. Note that you forgot some breakpoint
lines in the code, please delete them. Then make sure your tests pass on Python 2.7 and at least one Python 3.x version. Then I'll merge them.
I tried to run the tests but got a failure on
|
Hi, |
Hi, The test were running on: platform linux2 -- Python 2.7.17, pytest-4.6.11, py-1.11.0, pluggy-0.13.1 platform win32 -- Python 2.7.18, pytest-4.6.11, py-1.11.0, pluggy-0.13.1 Thanks for all your feedback, |
Good job, merged. The |
Thank you so much for merging and all your feedback. Thanks and have a nice weekend, |
Ansible zipped source support
Scope
It would be great to support Ansible zipped source files to make Ansible module debugging available in PySnooper
Problem
Ansible is using zipped source files on the remote node.
To get access to the source file itself you need to unzip the file during runtime.
The source file will be deleted after execution.
Solution
I added a condition to tracer.py like the condition for ipython to unzip the source file and get read access.