Skip to content

Commit ab5f29a

Browse files
committed
Dictionary ordering not guaranteed before Python 3.7; use key-value fetch to verify use of .update().
1 parent 282b739 commit ab5f29a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/framework/easyconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,9 +1744,9 @@ def test_update(self):
17441744
ec.update('patches', ['foo2.patch', 'bar2.patch'], allow_duplicate=False)
17451745
self.assertEqual(ec['patches'], patches_tmp)
17461746

1747-
# for dictionary values: extend
1747+
# for dictionary values: extend, test for existence (not ordering)
17481748
ec.update('sanity_check_paths', {'key1': 'value1'})
1749-
self.assertTrue(str(ec['sanity_check_paths']).endswith("'key1': 'value1'}"))
1749+
self.assertTrue(ec['sanity_check_paths']['key1']=='value1')
17501750

17511751
def test_hide_hidden_deps(self):
17521752
"""Test use of --hide-deps on hiddendependencies."""

0 commit comments

Comments
 (0)