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
Make rcparams more robust and explicit #911
Conversation
also increases testing of rcparams
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice. Feel free to make these fixes, or just merge.
arviz/tests/test_rcparams.py
Outdated
def test_warning_rc_file(caplog): | ||
"""Test invalid lines and duplicated keys log warnings and bad value raises error.""" | ||
path = os.path.dirname(os.path.abspath(__file__)) | ||
read_rcfile(path + "/test.rcparams") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
read_rcfile(path + "/test.rcparams") | |
read_rcfile(os.path.join(path, "/test.rcparams")) |
windows uses \
as a separator, so we have to play this game, or use pathlib
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the /
in "/test.rcparams"
be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
Co-Authored-By: Colin <ColCarroll@users.noreply.github.com>
arviz/tests/test_rcparams.py
Outdated
@@ -91,7 +91,7 @@ def test_rcparams_repr_str(): | |||
"""Check both repr and str print all keys.""" | |||
repr_str = rcParams.__repr__() | |||
str_str = rcParams.__str__() | |||
assert repr_str[:8] == "RcParams" | |||
assert repr_str.startsWith("RcParams") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small w
This LGTM |
Also increases testing of rcparams