avrae / d20

A fast, powerful, and extensible dice engine for D&D, d20 systems, and any other system that needs dice!
MIT License
115 stars 26 forks source link

Blackify code, Hypothesis testing #9

Closed zhudotexe closed 1 year ago

zhudotexe commented 2 years ago

Summary

This adds property-based testing using Hypothesis in order to test arbitrary dice strings.

It also blackifies the code and updates the CI to test on the latest versions of Python.

Note: Hypothesis testing takes a while, so builds will probably take much longer

Checklist

PR Type

codecov[bot] commented 2 years ago

Codecov Report

Merging #9 (9315a61) into master (591b1aa) will increase coverage by 0.33%. The diff coverage is 97.43%.

@@            Coverage Diff             @@
##           master       #9      +/-   ##
==========================================
+ Coverage   94.52%   94.86%   +0.33%     
==========================================
  Files           8        8              
  Lines         895      895              
==========================================
+ Hits          846      849       +3     
+ Misses         49       46       -3     
Impacted Files Coverage Δ
d20/expression.py 96.05% <85.71%> (+0.65%) :arrow_up:
d20/dice.py 94.36% <100.00%> (ø)
d20/diceast.py 91.63% <100.00%> (ø)
d20/errors.py 100.00% <100.00%> (ø)
d20/stringifiers.py 100.00% <100.00%> (+1.23%) :arrow_up:
d20/utils.py 98.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.