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

Reformat tests to use Pytest style; fix infinite comparison for OneOfASet #45

Merged
merged 3 commits into from
May 10, 2024

Commits on May 8, 2024

  1. Convert tests to pytest format

    - Use parameterization in pytest to simplify many test cases by wrapping the input and expected values in tuples
    - No need for unittest or class wrappers
    - There is a legitimately failing test in parser/tests.py - code change needed in parser_classes to handle this I think
    - natlang/tests.py will need to be updated to match the new spec, as will the whole text_to_edtf() function
    ColeDCrawford committed May 8, 2024
    Configuration menu
    Copy the full SHA
    7c41b8c View commit details
    Browse the repository at this point in the history
  2. Fix infinite comparison for OneOfASet

    The max and min functions now use a generator expression to filter out infinite values unless they are directly relevant to the calculation; if inf or -inf are found, they are returned instead of doing a comparison.
    ColeDCrawford committed May 8, 2024
    Configuration menu
    Copy the full SHA
    cf341bb View commit details
    Browse the repository at this point in the history
  3. Upgrade actions/setup-python

    Use v5, which uses node v20 rather than deprecated v16
    ColeDCrawford committed May 8, 2024
    Configuration menu
    Copy the full SHA
    46b7b8f View commit details
    Browse the repository at this point in the history