-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Remove some usages of OrderedDict #20078
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
from collections import OrderedDict | ||
from contextlib import contextmanager | ||
import gc | ||
from pathlib import Path | ||
|
@@ -138,10 +137,9 @@ def test_context_with_union_of_dict_and_namedstyle(): | |
def test_context_with_badparam(): | ||
original_value = 'gray' | ||
other_value = 'blue' | ||
d = OrderedDict([(PARAM, original_value), ('badparam', None)]) | ||
with style.context({PARAM: other_value}): | ||
assert mpl.rcParams[PARAM] == other_value | ||
x = style.context([d]) | ||
x = style.context({PARAM: original_value, 'badparam': None}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose this was written to check that the error occurs when entering the context, and not when creating it. |
||
with pytest.raises(KeyError): | ||
with x: | ||
pass | ||
|
Uh oh!
There was an error while loading. Please reload this page.