diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-05 14:40:07 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-05 14:40:10 -0700 |
commit | 282c38de521da379a2ea6407c6ff72e21f09c65c (patch) | |
tree | 4ea905441b60565ae2cf4760649e292cb1fc9e80 /python/tests/api_filesets.py | |
parent | c87befeff80f609e0890ec608d9e65186ae528e8 (diff) | |
download | fatcat-282c38de521da379a2ea6407c6ff72e21f09c65c.tar.gz fatcat-282c38de521da379a2ea6407c6ff72e21f09c65c.zip |
python tests: verify array sort order
In a couple cases (eg, filesets), had made tests agnostic to sort order,
because the sort order was not stable.
In other cases, simply small cleanups and comment improvements.
Diffstat (limited to 'python/tests/api_filesets.py')
-rw-r--r-- | python/tests/api_filesets.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/python/tests/api_filesets.py b/python/tests/api_filesets.py index 1ec0df17..d7654eb9 100644 --- a/python/tests/api_filesets.py +++ b/python/tests/api_filesets.py @@ -50,17 +50,13 @@ def test_fileset(api): # check that fields match assert fs1.urls == fs2.urls - # XXX: manifest return order is *NOT* currently stable - assert (fs1.manifest == fs2.manifest) or (fs1.manifest == list(reversed(fs2.manifest))) + assert fs1.manifest == fs2.manifest assert fs1.release_ids == fs2.release_ids assert fs1.extra == fs2.extra # expansion r1 = api.get_release(r1edit.ident, expand="filesets") - # XXX: manifest return order is *NOT* currently stable - assert (r1.filesets[0].manifest == fs1.manifest) or ( - r1.filesets[0].manifest == list(reversed(fs1.manifest)) - ) + assert r1.filesets[0].manifest == fs1.manifest # get redirects (none) assert api.get_fileset_redirects(fs2.ident) == [] |