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

Decompress history data for testing assertions #15085

Merged
merged 6 commits into from Jun 21, 2023

Conversation

bernt-matthias
Copy link
Contributor

@bernt-matthias bernt-matthias commented Nov 30, 2022

Fixes #11521

Currently (text) test assertions are not applicable to compressed data.

With this change test data will be decompressed before testing content assertions if the decompress keyword is given in the parent output or element.

TODO:

  • test (in particular file size assertion.. )
    • the tests are in a separate commit since they are otherwise difficult to spot due to the rewrite of the assertion unit test

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@github-actions github-actions bot added this to the 23.0 milestone Nov 30, 2022
@bernt-matthias
Copy link
Contributor Author

I added tests. Quite happy with it now.

I verified that it is possible to specify assertions for compressed and decompressed content of an output (by specifying it multiple times in a test .. otherwise we would have needed to execute the test multiple times).

I was wondering:

  • the assertion function takes bytes as input (which should be correct)
  • but in the unit tests strings are used

Can / should we fix this? Would this by uncovered by mypy if the tests would be type annotated?

@bernt-matthias bernt-matthias force-pushed the topic/decompress-assertions branch 3 times, most recently from 04efd5f to ef67e0e Compare December 16, 2022 20:24
@dannon dannon modified the milestones: 23.0, 23.1 Jan 10, 2023
currently (text) test assertions are not applicable
to compressed data.

with this test data will be decompressed befor testing
content assertions if the decopress keyword is given
in the parent `output` or `element`.
@bernt-matthias bernt-matthias force-pushed the topic/decompress-assertions branch 2 times, most recently from 5b40565 to 5e96224 Compare March 6, 2023 19:55
@mvdbeek mvdbeek merged commit a68a453 into galaxyproject:dev Jun 21, 2023
38 of 39 checks passed
@github-actions
Copy link

This PR was merged without a "kind/" label, please correct.

@bernt-matthias bernt-matthias deleted the topic/decompress-assertions branch June 21, 2023 21:24
bernt-matthias added a commit to bernt-matthias/tools-iuc that referenced this pull request Nov 3, 2023
test 4 was failing due to galaxyproject/galaxy#15085

here the size assertion makes no sense given that we compare for exact
equality anyway.
bernt-matthias added a commit to bernt-matthias/tools-iuc that referenced this pull request Nov 4, 2023
test 4 was failing due to galaxyproject/galaxy#15085

here the size assertion makes no sense given that we compare for exact
equality anyway.
@bernt-matthias bernt-matthias mentioned this pull request Dec 14, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use decompress attribute for more than compare="diff" on test outputs
3 participants