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 test with Hypothesmith #1361

Merged
merged 2 commits into from
Aug 1, 2020

Conversation

Zac-HD
Copy link
Member

@Zac-HD Zac-HD commented Jul 31, 2020

Hey @timothycrosley! I saw Zac-HD/hypothesmith#8 and thought I'd write you a pull request 😄

Notable features:

  • custom strategy for Config objects to explore more weird edge cases
  • custom composition of Hypothesmith strategies to boost number of import statements
  • custom targeting logic to boost code complexity and number of import statements

Bugs that this can find (albeit with lowish probability):

  • "import A\nimportA\r\n\n", importA incorrectly treated as an import, unstable whitespace

Once you get it passing, I'd suggest using while pytest -n=auto --dist=each tests/test_hypothesmith.py ; do : ; done to soak up some CPU time looking for bugs overnight - if that doesn't find anything, it's unlikely that there's anything the test can find at all.

@Zac-HD Zac-HD force-pushed the property-tests branch 4 times, most recently from 7862cd2 to 9030cbe Compare July 31, 2020 14:18
@codecov-commenter
Copy link

Codecov Report

Merging #1361 into develop will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           develop     #1361   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           34        34           
  Lines         2328      2328           
=========================================
  Hits          2328      2328           

@timothycrosley
Copy link
Member

This is awesome! Thank you!

@timothycrosley timothycrosley merged commit d4159e1 into PyCQA:develop Aug 1, 2020
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.

3 participants