Skip to content

Commit 8f736f5

Browse files
committed
Perform full intended assertion in test
Since Python 2.3 sorted() has been guaranteed to be stable. The comment was wrong, and thus it makes sense to do the full assertion as clearly intended. Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
1 parent df1072f commit 8f736f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/messages/test_normalized_string.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ def test_normalized_string():
1414
assert ab1 <= ab2 # __le__
1515
assert ab1 != ac1 # __ne__
1616
assert not z # __nonzero__ / __bool__
17-
assert sorted([ab1, ab2, ac1]) # the sort order is not stable so we can't really check it, just that we can sort
17+
assert sorted([ab1, ab2, ac1]) == [ab1, ab2, ac1] # sorted() is stable

0 commit comments

Comments
 (0)