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 pytest plugin option to ignore unrecognized tags #771

Merged

Conversation

eslavich
Copy link
Contributor

@eslavich eslavich commented Mar 5, 2020

This is needed so that schemas examples can be tested before the schema's ExtensionType exists (or, tested when the package containing the ExtensionType isn't installed).

@eslavich eslavich modified the milestones: 2.6, 2.6.0, 2.6.0-temp Mar 5, 2020
@codecov
Copy link

codecov bot commented Mar 5, 2020

Codecov Report

Merging #771 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #771   +/-   ##
=======================================
  Coverage   93.82%   93.82%           
=======================================
  Files          43       43           
  Lines        4910     4910           
=======================================
  Hits         4607     4607           
  Misses        303      303

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 ca8f3eb...2cc0007. Read the comment docs.

@eslavich
Copy link
Contributor Author

eslavich commented Mar 5, 2020

I'm going to merge this early so we can move forward with @shannnnnyyy's asdf-standard work, I'll address any comments in an additional PR.

@eslavich eslavich merged commit 12012d3 into asdf-format:master Mar 5, 2020
@eslavich eslavich deleted the eslavich-add-pytest-plugin-option branch March 5, 2020 16:43
Copy link
Contributor

@jdavies-st jdavies-st left a comment

Choose a reason for hiding this comment

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

So it looks like this PR adds the plumbing for the pytest configuration and propagates it to the functions that need it. But where's the actual tag ignoring functionality implemented?

@eslavich
Copy link
Contributor Author

eslavich commented Mar 5, 2020

So it looks like this PR adds the plumbing for the pytest configuration and propagates it to the functions that need it. But where's the actual tag ignoring functionality implemented?

Happily, that was already implemented in asdf, as a flag that is passed to the AsdfFile initializer. Once I propagate the flag to that point, the existing code takes over. The bit that ignores the warning if the flag is set is here:

https://github.com/spacetelescope/asdf/blob/master/asdf/yamlutil.py#L254

@jdavies-st
Copy link
Contributor

Ah cool! I bet you were happy to find it already implemented! 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants