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

Unit Testing Helper #136

Merged
merged 13 commits into from
Nov 14, 2024
Merged

Unit Testing Helper #136

merged 13 commits into from
Nov 14, 2024

Conversation

fsoubelet
Copy link
Member

In #135 (pending) I introduced the assert_tfs_frame_equal function in the conftest.py file, which is quite convenient.

In pylhc/omc3#463 a similar version was introduced in omc3, with tests, and we figured it would make sense to provide it as a public API from the tfs package directly.

In this PR I introduce a tfs.testing module, with the assert_tfs_frame_equal function there. Tests have been copied over from those implemented by @JoschD in pylhc/omc3#463.

Version is bumped to 3.9.0, changelog updated. This can safely be merged and released, and I'll take care of merging back into #135 to use the new functionality there.

@fsoubelet fsoubelet added Type: Feature A (suggetion for a) new feature or enhancement in functionality. Type: CI/CD Improvements, updates and fixes to the continuous integration. Type: Release Issue preparing for a release. Priority: Low Work on this if you have some spare time. Estimate: Easy Good first issue for newcomers. Straightforward fixes. Status: Review Needed Work currently stopped, untils someone else reviews it. labels Nov 14, 2024
@fsoubelet fsoubelet self-assigned this Nov 14, 2024
@fsoubelet
Copy link
Member Author

I've added a little tweak to the coverage workflow so it prints out coverage to the console on CI runs, after running tests.

Some coverage is dropped because the contents of if TYPE_CHECKING blocks are never run (obviously). This is patched in the coverage config in #135 so I figured we can bite the bullet now and benefit from it once that PR is merged.

tfs/testing.py Outdated Show resolved Hide resolved
@fsoubelet
Copy link
Member Author

I have tried to make very explicit the behaviour changes from passing True or False to compare_keys in cef3060, let me know if this reads better.

@fsoubelet fsoubelet merged commit aa8f961 into master Nov 14, 2024
20 of 21 checks passed
@fsoubelet fsoubelet deleted the testing branch November 14, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Estimate: Easy Good first issue for newcomers. Straightforward fixes. Priority: Low Work on this if you have some spare time. Status: Review Needed Work currently stopped, untils someone else reviews it. Type: CI/CD Improvements, updates and fixes to the continuous integration. Type: Feature A (suggetion for a) new feature or enhancement in functionality. Type: Release Issue preparing for a release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants