Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upTidy up, and add harness for examples #27
Merged
Conversation
The examples/csv/fuzz.py is actually testing the zipfile module, so it has been renamed to reflect this. There are slight differences in the Python 2 usage, which I've harmonised in the module.
Some simple checks for the behaviour of the modules under Python 2 compared to Python 3.
The example fuzzers provide a useful way to see how you might use the pythonfuzz package. However, they're no use if they don't work. Adding a tool that is able to run them all, and report on their status will ensure that these do not get broken in the future. The tool is able to be configured with the number of runs that it expects to execute, and whether it will keep any crash or timeout files that are generated. At the end of the run of each example, it will report the collected information from the run. This should be useful for checking the performance in the future, as well. If any of the examples fails to function - ie it reports an error itself, then the runner will exit with a non-0 return code. This will allow it to be used as a gate for the examples being functional.
…ess. In order to have an easy way to control which python runs the examples, make the python version used into the one used by the harness itself. That way if you invoke it with Python 3, it'll test with Python 3.
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
gerph commentedJan 12, 2020
This change adds a harness for the examples so that they can be run as part of automation, or to check what the performance is in a simple way. The changes are:
csvexample tozipfile, as that's what it testsThe harness output looks like this:
The number of runs by default is 1000, which is poor for testing performance, but command line option can change that as needed by the user.