launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25564
[Merge] ~cjwatson/txpkgupload:py3-remove-unnecessary-sorts into txpkgupload:master
Colin Watson has proposed merging ~cjwatson/txpkgupload:py3-remove-unnecessary-sorts into txpkgupload:master.
Commit message:
Remove unnecessary .sort() calls in tests
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/txpkgupload/+git/txpkgupload/+merge/392889
These would need a "key" argument to work properly on Python 3, but they're also unnecessary since the following tests sort these lists again anyway.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/txpkgupload:py3-remove-unnecessary-sorts into txpkgupload:master.
diff --git a/src/txpkgupload/tests/filesystem.txt b/src/txpkgupload/tests/filesystem.txt
index afafca8..52f9dac 100644
--- a/src/txpkgupload/tests/filesystem.txt
+++ b/src/txpkgupload/tests/filesystem.txt
@@ -178,9 +178,7 @@ sorted orders for comparison.
... # doesn't care about the sort order of the dictionaries.
... return sorted(ls_infos, key=itemgetter('name'))
- >>> expected.sort()
>>> returned = ufs.ls(".")
- >>> returned.sort()
>>> sorted_listings(expected) == sorted_listings(returned)
True
@@ -201,15 +199,12 @@ returns a true value.
... if i["name"] == "foo":
... filtered_expected = [i];
>>> returned = ufs.ls(".", always_true_filter)
- >>> returned.sort()
>>> sorted_listings(expected) == sorted_listings(returned)
True
>>> returned = ufs.ls(".", always_false_filter)
- >>> returned.sort()
>>> returned == []
True
>>> returned = ufs.ls(".", arbitrary_filter)
- >>> returned.sort()
>>> sorted_listings(filtered_expected) == sorted_listings(returned)
True
>>> for i in [ "foo", "bar" ]: