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

Add Unit Tests for utilFncs.py #697

Merged
merged 10 commits into from
Feb 3, 2025
Merged

Conversation

royagrace
Copy link
Contributor

Description

I added tests to test 8 uncovered functions from utilFncs.py

Motivation and Context

This should help to increase the coverage of total tested lines

How Has This Been Tested?

All changes are passing locally using the " pytest test/test_util.py " command.

I added code to test the different possible outcomes for each function called.
However, for the function show_progress() I was having problems being able to test the update() and
finish() member functions, so those tests have not been added yet.

Screenshots (if appropriate):

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have added an explanation of what your changes do and why you'd like us to include them.
  • I have written new tests for your core changes, as applicable.
  • I have successfully ran tests with your changes locally.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@royagrace
Copy link
Contributor Author

@jlmaurer ready for review

@royagrace royagrace changed the title Create test Add Unit Tests Jan 12, 2025
@royagrace royagrace changed the title Add Unit Tests Add Unit Tests for utilFncs.py Jan 12, 2025
@jlmaurer jlmaurer self-requested a review January 16, 2025 15:51
Copy link
Collaborator

@jlmaurer jlmaurer left a comment

Choose a reason for hiding this comment

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

LGTM once unit tests pass and those minor issues.

@@ -8,6 +8,8 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

[Unreleased]
### Changed
* Added unit tests for utilFncs.py
* [686](https://github.com/dbekaert/RAiDER/pull/686) - Linted the project with `ruff`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Change the changelog message to what you actually did. @royagrace
Also make sure the commit number is the correct number.

@jlmaurer
Copy link
Collaborator

@royagrace I think you'll need to rebase on dev to get the failing tests to pass.

@jlmaurer jlmaurer mentioned this pull request Feb 3, 2025
9 tasks
@jlmaurer jlmaurer merged commit 5961c97 into dbekaert:dev Feb 3, 2025
3 of 7 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