This PR provides a starting point to fully 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 the dev installation type).
Issues Addressed
11
Changes made
Create a dev installation type in setup.cfg so that development dependencies can be installed as follows:
pip install -e .[dev]
Construct dev package list from an examination of workflows and libraries needed for testing, namely pytest and hypothesis
Add pytest configuration within setup.cfg
Add default hypothesis profile in tests/conftest.py
Create place for common strategy functions in tests/strategies.py
Add unit tests for the following functionality:
Set
Or
Amount (Limited and not property-based at this time)
join
Range
Add a main workflow to run unit tests either on command or within a PR
Update styling workflow to allow calling by workflow dispatch
Include changes from #14 so that all checks pass
Considerations
The builders for all patterns tests generate a string. In a future release we can broaden the scope of these tests to generate a ValidPatternType
The main.yml workflow refers to the version of styling.yml within the repository at the time of commit. In the future this will be updated to reflect the master state after styling.yml is merged into master
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!
Summary
This PR provides a starting point to fully 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
11
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 dispatchConsiderations
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!