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 OME sample data to tests, and mark with xfail for now #10

Merged
merged 1 commit into from
Jul 17, 2020

Conversation

tlambert03
Copy link
Owner

This PR adds all of the sample xml files from https://github.com/ome/ome-model/tree/master/specification/samples/2016-06 to the testing suite, and explicitly marks the files that are not known to pass with pytest.mark.xfail. As such, you can now run pytest and it will build the model, and test all of the samples, and if you fix a problem the test will actually fail with:
[XPASS(strict)] Unexpected success. You fixed it!

Then, add the name of the file(s) that your changes have fixed to the SHOULD_PASS set in test_autogen.py. Currently this only includes:

SHOULD_PASS = {"example.ome", "small.ome"}
SHOULD_RAISE = {"bad.ome"}  # this xml is actually invalid and should raise validation error.

@codecov-commenter
Copy link

Codecov Report

Merging #10 into master will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #10      +/-   ##
==========================================
+ Coverage   95.37%   95.40%   +0.03%     
==========================================
  Files           1        1              
  Lines         389      392       +3     
==========================================
+ Hits          371      374       +3     
  Misses         18       18              
Impacted Files Coverage Δ
src/ome_autogen.py 95.40% <100.00%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c0c2fd...6e36135. Read the comment docs.

@tlambert03
Copy link
Owner Author

@jmuhlich, this should help iterate quicker locally on #9

Copy link
Collaborator

@jmuhlich jmuhlich left a comment

Choose a reason for hiding this comment

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

Great idea!

@tlambert03 tlambert03 merged commit 40d5492 into master Jul 17, 2020
@tlambert03 tlambert03 deleted the more-tests branch July 17, 2020 14:17
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.

3 participants