GrandMoff100 / RegexFactory

Dynamically construct regex patterns with native python representations
https://regexfactory.readthedocs.io
GNU General Public License v3.0
7 stars 4 forks source link

Feature/issue 11 Start of pytest testing #15

Closed frank113 closed 1 year ago

frank113 commented 1 year ago

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 the dev installation type).

Issues Addressed

Changes made

  1. Create a dev installation type in setup.cfg so that development dependencies can be installed as follows:
pip install -e .[dev]
  1. Construct dev package list from an examination of workflows and libraries needed for testing, namely pytest and hypothesis
  2. Add pytest configuration within setup.cfg
  3. Add default hypothesis profile in tests/conftest.py
  4. Create place for common strategy functions in tests/strategies.py
  5. Add unit tests for the following functionality:
    • Set
    • Or
    • Amount (Limited and not property-based at this time)
    • join
    • Range
  6. Add a main workflow to run unit tests either on command or within a PR
  7. Update styling workflow to allow calling by workflow dispatch
  8. Include changes from #14 so that all checks pass

Considerations

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!

frank113 commented 1 year ago

This PR refers to an outdated branch on my fork. Will close and open a fresh PR with the correct branch.