-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feature/issue 11 start pytest testing #16
Feature/issue 11 start pytest testing #16
Conversation
Yay! Thank you so much! |
Needed to sync with current |
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
@example(arr=["0", "0"]) | ||
def test_matching_or(arr: list): | ||
actual = Or(*arr) | ||
if len(arr) == 1: |
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.
You can remove this if statement and simplify everything to just the for loop because you do the same thing in both cases, I think.
Summary
This PR provides a starting point to partially address issue #11 . More specifically some of the operations in
patterns.py
are tested using property-based testing. This PR is intended to be a first step in fully testing this package and provide velocity by accounting for house-keeping items (such as thedev
installation type).Issues Addressed
Changes made
dev
installation type insetup.cfg
so that development dependencies can be installed as follows:dev
package list from an examination of workflows and libraries needed for testing, namelypytest
andhypothesis
pytest
configuration withinsetup.cfg
default
hypothesis profile intests/conftest.py
tests/strategies.py
Set
Or
Amount
(Limited and not property-based at this time)join
Range
main
workflow to run unit tests either on command or within a PRstyling
workflow to allow calling by workflow dispatchESCAPED_CHARACTERS
andValidPatternType
topattern
module exports defined inregexfactory/__init__.py
Considerations
patterns
tests generate a string. In a future release we can broaden the scope of these tests to generate aValidPatternType
main.yml
workflow refers to the version ofstyling.yml
within the repository at the time of commit. In the future this will be updated to reflect themaster
state afterstyling.yml
is merged intomaster
Other
While the process of unit testing everything in the package will be a long process I hope this PR provides velocity to kick off the process!
Edit: Confirmation of workflow success: https://github.com/frank113/RegexFactory/actions/runs/5374169395/jobs/9749249875