[PATCH] D93115: LNT: Sort testsuites ascendingly

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 06:49:42 PST 2020


thopre accepted this revision.
thopre added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lnt/server/db/v4db.py:59
+        # Order testuites alphabetically to get groupings
+        self.testsuite = dict (sorted (self.testsuite.items()))
 
----------------
tnfchris wrote:
> thopre wrote:
> > Shouldn't you use an OrderedDict instead of dict to guarantee the ordering will be the same as when inserted?
> From what I understand, in Python 3, dict is guaranteed to keep order during insertion https://mail.python.org/pipermail/python-dev/2017-December/151283.html
Ah yes indeed, https://docs.python.org/3/library/stdtypes.html#dict has:


> Changed in version 3.7: Dictionary order is guaranteed to be insertion order. This behavior was an implementation detail of CPython from 3.6.




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93115/new/

https://reviews.llvm.org/D93115



More information about the llvm-commits mailing list