From 1702dc3ed0ea9072055fed149f6250f0f054ddb4 Mon Sep 17 00:00:00 2001 From: Honza Kral Date: Sun, 16 Jun 2013 15:51:21 +0200 Subject: [PATCH] Move Yaml test defintions to a subdir for forwards compatibility In the future those files will most likely be in a separate repo --- test_elasticsearch/test_server/test_common.py | 6 +++--- test_elasticsearch/test_server/{ => yaml}/10_analyze.yaml | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename test_elasticsearch/test_server/{ => yaml}/10_analyze.yaml (100%) diff --git a/test_elasticsearch/test_server/test_common.py b/test_elasticsearch/test_server/test_common.py index ebff06bd..ba88527b 100644 --- a/test_elasticsearch/test_server/test_common.py +++ b/test_elasticsearch/test_server/test_common.py @@ -116,14 +116,14 @@ def construct_case(filename, name): return type(name, (YamlTestCase, ), attrs) -current_dir = abspath(dirname(__file__)) +yaml_dir = join(abspath(dirname(__file__)), 'yaml') # find all the test definitions in yaml files ... -for filename in listdir(current_dir): +for filename in listdir(yaml_dir): if not filename.endswith('.yaml'): continue # ... parse them name = 'Test' + filename.rsplit('.', 1)[0][3:].title() # and insert them into locals for test runner to find them - locals()[name] = construct_case(join(current_dir, filename), name) + locals()[name] = construct_case(join(yaml_dir, filename), name) diff --git a/test_elasticsearch/test_server/10_analyze.yaml b/test_elasticsearch/test_server/yaml/10_analyze.yaml similarity index 100% rename from test_elasticsearch/test_server/10_analyze.yaml rename to test_elasticsearch/test_server/yaml/10_analyze.yaml