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

Minor tidy up, and skip the tests if no file is found. #295

Conversation

samcunliffe
Copy link
Member

Context/Description

Possibly overkill but in the interest of small PRs (cough cough). Here is a tweak to your small data sample unit tests which skips them if the data not found. This is a PR against our draft branch from Friday (so you know what I'm proposing).

Still TODO: decide whether to provide instructions to generate them here in the logging. What do you think?

Testing

Checked locally with

➤ mv ../tdms/tests/unit/benchmark_scripts/unit_test_data ../tdms/tests/unit/benchmark_scripts/_unit_test_data
➤ ./tdms_tests

< ... blah blah ...>

===============================================================================
test cases:  51 |  43 passed | 8 skipped
assertions: 904 | 904 passed

➤ mv ../tdms/tests/unit/benchmark_scripts/_unit_test_data ../tdms/tests/unit/benchmark_scripts/unit_test_data
➤ ./tdms_tests

< ... blah blah ...>

===============================================================================
All tests passed (944 assertions in 51 test cases)

samcunliffe and others added 2 commits May 15, 2023 09:42
* Update catch2.

v3.3 has some nice features. Including a SKIP() macro. 💙

* Skip the segfault test.
Since we're introducing a bit of complexity into the unit-testing
framework, at least we should skip the tests (developer quality of
life) with a nice warning explaining why.
@samcunliffe samcunliffe added the testing Adding or requesting more test coverage label May 15, 2023
2 lines → 1. And gets rid of another global.

Co-authored-by: willGraham01 <[email protected]>
@samcunliffe samcunliffe merged commit 02d04a8 into 181-pairdev-write-dataset-to-group May 16, 2023
@samcunliffe samcunliffe deleted the 181-pairdev-tidyup-plus-skip-tests branch May 16, 2023 15:55
willGraham01 added a commit that referenced this pull request May 19, 2023
* Update catch2 (#275)

* Update catch2.

v3.3 has some nice features. Including a SKIP() macro. 💙

* Skip the segfault test.

* SKIP unit tests if sample data not generated.

Since we're introducing a bit of complexity into the unit-testing
framework, at least we should skip the tests (developer quality of
life) with a nice warning explaining why.

* Skip function.

2 lines → 1. And gets rid of another global.

Co-authored-by: willGraham01 <[email protected]>

* Revert to explicitly skipping the broken test.

---------

Co-authored-by: willGraham01 <[email protected]>
willGraham01 added a commit that referenced this pull request May 19, 2023
* Update catch2 (#275)

* Update catch2.

v3.3 has some nice features. Including a SKIP() macro. 💙

* Skip the segfault test.

* SKIP unit tests if sample data not generated.

Since we're introducing a bit of complexity into the unit-testing
framework, at least we should skip the tests (developer quality of
life) with a nice warning explaining why.

* Skip function.

2 lines → 1. And gets rid of another global.

Co-authored-by: willGraham01 <[email protected]>

* Revert to explicitly skipping the broken test.

---------

Co-authored-by: willGraham01 <[email protected]>
@samcunliffe samcunliffe restored the 181-pairdev-tidyup-plus-skip-tests branch June 5, 2023 14:35
@willGraham01 willGraham01 deleted the 181-pairdev-tidyup-plus-skip-tests branch June 6, 2023 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Adding or requesting more test coverage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants