From e7a6a2096717551bbcb186978733281a86a88f18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85ke=20Forslund?= Date: Mon, 28 May 2018 15:32:56 +0200 Subject: [PATCH] Sort test cases so order is enforced --- test/integrationtests/skills/discover_tests.py | 5 +++-- test/integrationtests/skills/single_test.py | 3 ++- test/integrationtests/skills/skill_developers_testrunner.py | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/integrationtests/skills/discover_tests.py b/test/integrationtests/skills/discover_tests.py index 0de876cd1c..baa689e006 100644 --- a/test/integrationtests/skills/discover_tests.py +++ b/test/integrationtests/skills/discover_tests.py @@ -38,7 +38,7 @@ def discover_tests(skills_dir): tests = {} skills = [ skill for skill - in glob.glob(skills_dir + '/*') + in sorted(glob.glob(skills_dir + '/*')) if os.path.isdir(skill) ] @@ -54,7 +54,8 @@ def discover_tests(skills_dir): # Find all intent test files test_intent_files = [ (f, test_env) for f - in glob.glob(os.path.join(skill, 'test/intent/*.intent.json')) + in sorted( + glob.glob(os.path.join(skill, 'test/intent/*.intent.json'))) ] if len(test_intent_files) > 0: tests[skill] = test_intent_files diff --git a/test/integrationtests/skills/single_test.py b/test/integrationtests/skills/single_test.py index 7130c3fc4c..33c1d9a657 100644 --- a/test/integrationtests/skills/single_test.py +++ b/test/integrationtests/skills/single_test.py @@ -51,7 +51,8 @@ def discover_tests(): # Find intent tests test_intent_files = [ f for f - in glob.glob(os.path.join(skill, 'test/intent/*.intent.json')) + in sorted( + glob.glob(os.path.join(skill, 'test/intent/*.intent.json'))) ] if len(test_intent_files) > 0: tests[skill] = test_intent_files diff --git a/test/integrationtests/skills/skill_developers_testrunner.py b/test/integrationtests/skills/skill_developers_testrunner.py index dd5f31f457..75b53fe261 100644 --- a/test/integrationtests/skills/skill_developers_testrunner.py +++ b/test/integrationtests/skills/skill_developers_testrunner.py @@ -48,7 +48,8 @@ def discover_tests(): for skill in skills: test_intent_files = [ f for f - in glob.glob(os.path.join(skill, 'test/intent/*.intent.json')) + in sorted( + glob.glob(os.path.join(skill, 'test/intent/*.intent.json'))) ] if len(test_intent_files) > 0: tests[skill] = test_intent_files