Skip to content

Commit 7cd32d5

Browse files
committed
fix prop parsing
1 parent 427367b commit 7cd32d5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ultraplot/tests/test_thread_safety.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def modify_rc_on_thread(prop: str, value=None, with_context=True):
66
Apply arbitrary rc parameters in a thread-safe manner.
77
"""
88
if with_context:
9-
with uplt.rc.context(fontsize=value):
9+
with uplt.rc.context(**{prop: value}):
1010
assert uplt.rc[prop] == value, f"Thread {id} failed to set rc params"
1111
else:
1212
assert uplt.rc[prop] == value, f"Thread {id} failed to set rc params"
@@ -36,9 +36,9 @@ def wrapped_func(**kw):
3636
w.join()
3737

3838
if exceptions:
39-
raise RuntimeError(f"Thread raised exception: {exceptions[0]}") from exceptions[
40-
0
41-
]
39+
raise RuntimeError(
40+
f"Thread raised exception: {exceptions[0]} with {kwargs=}"
41+
) from exceptions[0]
4242

4343
if record:
4444
raise RuntimeError("Thread raised a warning")
@@ -52,7 +52,7 @@ def wrapped_func(**kw):
5252
("abc", "A. a. aa aaa aaaa.".split()),
5353
],
5454
)
55-
def test_setting_without_context(prop, options, with_context):
55+
def test_setting_rc(prop, options, with_context):
5656
"""
5757
Test the thread safety of a context setting
5858
"""

0 commit comments

Comments
 (0)