You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2020/08/23 23:17:11 UTC

[incubator-ponymail-unit-tests] branch master updated (228558d -> 59a6d38)

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-unit-tests.git.


    from 228558d  No need to try here
     new b78a74f  Retain order of keys, so index is first
     new 59a6d38  Put later generators last; keep key order

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 tests/test-generators.py | 6 ++++--
 tests/test-parsing.py    | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)


[incubator-ponymail-unit-tests] 02/02: Put later generators last; keep key order

Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-unit-tests.git

commit 59a6d3878e3f5023eb40a4af9c5f495bc7237122
Author: Sebb <se...@apache.org>
AuthorDate: Mon Aug 24 00:16:56 2020 +0100

    Put later generators last; keep key order
---
 tests/test-generators.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/test-generators.py b/tests/test-generators.py
index 8a6d8f4..c0f08b1 100755
--- a/tests/test-generators.py
+++ b/tests/test-generators.py
@@ -24,7 +24,8 @@ def generate_specs(args):
         import plugins.generators as generators
     yml = {}
     generator_names = generators.generator_names() if hasattr(generators, 'generator_names') else ['full', 'medium', 'cluster', 'legacy']
-    for gen_type in generator_names:
+    # sort so most recent generators come last to make comparisons easier
+    for gen_type in sorted(generator_names, key=lambda s: s.replace('dkim','zkim')):
         test_args = collections.namedtuple('testargs', ['parse_html', 'generator'])(parse_html, gen_type)
         archie = interfacer.Archiver(archiver, test_args)
         sys.stderr.write("Generating specs for type '%s'...\n" % gen_type)
@@ -43,7 +44,8 @@ def generate_specs(args):
             })
         yml[gen_type] = gen_spec
     with open(args.generate, 'w') as f:
-        yaml.dump({'args': {'cmd': " ".join(sys.argv)}, 'generators': {args.mboxfile: yml}}, f)
+        # don't sort keys here
+        yaml.dump({'args': {'cmd': " ".join(sys.argv)}, 'generators': {args.mboxfile: yml}}, f, sort_keys=False)
         f.close()
 
 


[incubator-ponymail-unit-tests] 01/02: Retain order of keys, so index is first

Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-unit-tests.git

commit b78a74f457888df7c031949908013d2d77bed3ae
Author: Sebb <se...@apache.org>
AuthorDate: Mon Aug 24 00:15:25 2020 +0100

    Retain order of keys, so index is first
---
 tests/test-parsing.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test-parsing.py b/tests/test-parsing.py
index 20e8c87..6997949 100755
--- a/tests/test-parsing.py
+++ b/tests/test-parsing.py
@@ -42,7 +42,7 @@ def generate_specs(args):
             })
         items[mboxfile] = tests
     with open(args.generate, 'w') as f:
-        yaml.dump({'args': {'cmd': " ".join(sys.argv), 'parse_html': True if args.html else False}, 'parsing': items}, f)
+        yaml.dump({'args': {'cmd': " ".join(sys.argv), 'parse_html': True if args.html else False}, 'parsing': items}, f, sort_keys=False)
         f.close()