Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

test(utilities): add test case to return False when checking files #101

Merged

Conversation

lizimu0709
Copy link
Contributor

Hi @lsetiawan ,
I've added a new parameter to the pytest.fixture called "no_files_found". In this case, I'm creating a unique directory path that does not exist in the filesystem, which is represented by the file_path. This scenario will ensure that the glob operation doesn't find any files matching the pattern, and thus, the test case for no files found during the glob operation will be covered.

With this modification, when running the tests, the test suite will include the missing test case, and the code coverage analysis should no longer show a missing coverage for that particular scenario. I am looking forward to your review!

@lsetiawan
Copy link
Member

Hi @lizimu0709! Thanks for your contribution. This is great!

Reference: uw-ssec/codeuw#24

@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.16% 🎉

Comparison is base (9ffb361) 41.44% compared to head (d0895e9) 41.61%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #101      +/-   ##
==========================================
+ Coverage   41.44%   41.61%   +0.16%     
==========================================
  Files          15       15              
  Lines         608      608              
==========================================
+ Hits          252      253       +1     
+ Misses        356      355       -1     

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lsetiawan lsetiawan changed the title Offshore Geodesy - Add test case to return False when checking files L1 Python Task test(utilities): add test case to return False when checking files Jul 26, 2023
@lsetiawan lsetiawan merged commit 9d27d45 into seafloor-geodesy:main Jul 26, 2023
@lizimu0709 lizimu0709 deleted the addTestCaseToReturnFalse branch August 1, 2023 22:34
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants