Move Yaml test defintions to a subdir for forwards compatibility

In the future those files will most likely be in a separate repo
This commit is contained in:
Honza Kral
2013-06-16 15:51:21 +02:00
parent af72b993f7
commit 1702dc3ed0
2 changed files with 3 additions and 3 deletions
@@ -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)