Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ecc91e5

Browse files
committed
TST: workaround for unpredictable order in list printing
1 parent 8aa800b commit ecc91e5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/tests/test_labeled_data_unpacking.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,11 @@ def funcy(ax, x, y, z, bar=None):
448448
"""Funcy does nothing"""
449449
pass
450450

451+
# lists can print in any order, so test for both x,bar and bar,x
451452
assert_regex(funcy.__doc__,
452-
r".*All arguments with the following names: 'x', 'bar'\.")
453+
r".*All arguments with the following names: '.*', '.*'\.")
454+
assert_regex(funcy.__doc__, r".*'x'.*")
455+
assert_regex(funcy.__doc__, r".*'bar'.*")
453456
assert_not_regex(funcy.__doc__,
454457
r".*All positional and all keyword arguments\.")
455458
assert_not_regex(funcy.__doc__, r".*All positional arguments\.")

0 commit comments

Comments
 (0)