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:
@@ -116,14 +116,14 @@ def construct_case(filename, name):
|
|||||||
return type(name, (YamlTestCase, ), attrs)
|
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 ...
|
# 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'):
|
if not filename.endswith('.yaml'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# ... parse them
|
# ... parse them
|
||||||
name = 'Test' + filename.rsplit('.', 1)[0][3:].title()
|
name = 'Test' + filename.rsplit('.', 1)[0][3:].title()
|
||||||
# and insert them into locals for test runner to find them
|
# 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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user