Skip to content
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 property-based fuzz test #81

Merged
merged 2 commits into from Apr 2, 2021
Merged

Add property-based fuzz test #81

merged 2 commits into from Apr 2, 2021

Conversation

MaxG87
Copy link
Contributor

@MaxG87 MaxG87 commented Sep 2, 2020

A test is added that runs mccabe against plenty of random yet valid
Python source code. Right now, the test does not do much - it only tests
whether mccabe accepts the code. Already this is an achievement because
now weird edge cases are covered.

Having this test suite integrated will also allow to build up on that.
The author of Hypothesis claimed to work on a coverage guided test
runner. Also more general properties to hold on any valid source code
now can be tested.

A test is added that runs mccabe against plenty of random yet valid
Python source code. Right now, the test does not do much - it only tests
whether mccabe accepts the code. Already this is an achievement because
now weird edge cases are covered.

Having this test suite integrated will also allow to build up on that.
The author of Hypothesis claimed to work on a coverage guided test
runner. Also more general properties to hold on any valid source code
now can be tested.
tox.ini Outdated Show resolved Hide resolved
test_mccabe.py Outdated Show resolved Hide resolved
@MaxG87
Copy link
Contributor Author

MaxG87 commented Mar 31, 2021

Great! Thank you very much. If you would send me a patch I would apply it so you get credits and authorship.

@cclauss
Copy link
Contributor

cclauss commented Mar 31, 2021

I do not know how to generate a patch and I do not need credit so please try to apply these changes on your end. My sense is that given and settings might still give you trouble. If so, you can try to stub them out or @skipif a whole class that contains your test code.

@sigmavirus24
Copy link
Member

@MaxG87 if you use the GitHub UI you "commit(ting) suggestion" or "add(ing) suggestion to batch" will give @cclauss credit

The commited suggestions will restore compatibility with Python 3.6.

Co-authored-by: Christian Clauss <cclauss@me.com>
@sigmavirus24
Copy link
Member

Closing and re-opening to trigger a new merged build on travis

@sigmavirus24 sigmavirus24 reopened this Apr 2, 2021
@sigmavirus24 sigmavirus24 reopened this Apr 2, 2021
@sigmavirus24 sigmavirus24 merged commit 2d4dd94 into PyCQA:master Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants