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

fmatch unit tests and github action #10

Closed

Conversation

shashank-boyapally
Copy link
Collaborator

@shashank-boyapally shashank-boyapally commented Jan 18, 2024

Type of change

  • Refactor
  • New feature
  • Bug fix
  • Optimization
  • Documentation Update

Description

Unit tests for fmatch are added in the tests/ sub directory. Achieved the coverage of 100%. To run the unit tests please follow the following commands

>> cd fmatch
>> pip install -r requirements.txt
>> cd tests
>> python3 -m pytest --cov

Output:

(venv) sboyapal py-commons (fmatch) >> python3 -m pytest fmatch/tests --cov --random-order
=========================================================== test session starts ===========================================================
platform darwin -- Python 3.11.7, pytest-7.4.4, pluggy-1.3.0
Using --random-order-bucket=module
Using --random-order-seed=359233

rootdir: /Users/sboyapal/Documents/Redhat/py-commons
plugins: random-order-1.1.0, cov-4.1.0
collected 13 items                                                                                                                        

fmatch/tests/test_matcher.py .............                                                                                          [100%]

---------- coverage: platform darwin, python 3.11.7-final-0 ----------
Name                           Stmts   Miss  Cover
--------------------------------------------------
fmatch/__init__.py                 0      0   100%
fmatch/matcher.py                114      0   100%
fmatch/tests/__init__.py           0      0   100%
fmatch/tests/test_matcher.py      84      1    99%
--------------------------------------------------
TOTAL                            198      1    99%


=========================================================== 13 passed in 0.62s ============================================================

Related Tickets & Documents

  • Related Issue #
  • Closes #

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please describe the System Under Test.
  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant