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 actions #11

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

shashank-boyapally
Copy link
Collaborator

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.

Copy link
Member

@jtaleric jtaleric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! Thanks!!

@shashank-boyapally
Copy link
Collaborator Author

Merging!!

@shashank-boyapally shashank-boyapally merged commit 1d1d6c1 into cloud-bulldozer:main Jan 18, 2024
8 of 10 checks passed
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.

2 participants