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

Fix print_stats function for RAMSES datasets. #3196

Merged
merged 4 commits into from
Apr 14, 2021

Conversation

cphyc
Copy link
Member

@cphyc cphyc commented Apr 13, 2021

PR Summary

The print_stats function is broken for RAMSES datasets.

PR Checklist

  • Adds a test for any bugs fixed. Adds tests for new features.

@cphyc cphyc added bug code frontends Things related to specific frontends labels Apr 13, 2021
@neutrinoceros
Copy link
Member

I'm not sure the new test is actually preventing this kind of bug to reappear. Can you add a note we should use capsys to actually test the output (when pytest is our only test runner) ?

Copy link
Member

@munkm munkm left a comment

Choose a reason for hiding this comment

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

I think this looks good!

@@ -638,7 +638,7 @@ def test_max_level():
assert any(ds.r["index", "grid_level"] == 2)


@requires_file(ramses_new_format)
@requires_file(output_00080)
Copy link
Member

Choose a reason for hiding this comment

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

Good correction here!!!

def test_print_stats():
ds = yt.load(ramses_new_format)

# Should work
Copy link
Member

Choose a reason for hiding this comment

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

🤞

@cphyc
Copy link
Member Author

cphyc commented Apr 13, 2021

I should have written it more clearly, but when I say broken I mean it raises an exception.

@neutrinoceros neutrinoceros merged commit 813f486 into yt-project:main Apr 14, 2021
@cphyc cphyc deleted the fix-print-stats branch April 14, 2021 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug code frontends Things related to specific frontends
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants