Skip to content
Snippets Groups Projects
Commit 88ccb9cb authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

STY: autopep8

parent 07c4406e
No related branches found
No related tags found
2 merge requests!160STY: styling,!126Transformers
Pipeline #45818 passed
......@@ -30,7 +30,7 @@ from typing import Any
def submatch(in_value: Any, in_parameters: dict):
"""
Substitute the variable if it matches the regexp stored in "match".
Returns the "in" value if it does NOT match the reg exp of 'match'.
Otherwise (if it matches) the value of 'then' stored in the second argument is returned.
"""
......
......@@ -168,7 +168,7 @@ def test_markdown_converter(converter_registry):
test_readme2 = File(
"README.md",
UNITTESTDIR/"test_directories" / "examples_article" /
UNITTESTDIR / "test_directories" / "examples_article" /
"ExperimentalData" / "2020_SpeedOfLight" / "2020-01-01_TimeOfFlight" / "README.md"
)
......@@ -246,7 +246,7 @@ def test_json_converter(converter_registry):
invalid_json = File(
"invalidjson.json",
UNITTESTDIR/"test_directories" / "examples_json" / "invalidjson.json"
UNITTESTDIR / "test_directories" / "examples_json" / "invalidjson.json"
)
# Doesn't validate because of missing required 'name' property
with pytest.raises(ConverterValidationError) as err:
......@@ -255,7 +255,7 @@ def test_json_converter(converter_registry):
broken_json = File(
"brokenjson.json",
UNITTESTDIR/"test_directories" / "examples_json" / "brokenjson.json"
UNITTESTDIR / "test_directories" / "examples_json" / "brokenjson.json"
)
with pytest.raises(json.decoder.JSONDecodeError) as err:
jsonconverter.create_children(None, broken_json)
......@@ -320,7 +320,7 @@ def test_yaml_converter(converter_registry):
invalid_yaml = File(
"invalidyaml.yml",
UNITTESTDIR/"test_directories" / "test_yamls" / "invalidyaml.yml"
UNITTESTDIR / "test_directories" / "test_yamls" / "invalidyaml.yml"
)
# Doesn't validate because of missing required 'name' property
......@@ -330,7 +330,7 @@ def test_yaml_converter(converter_registry):
broken_yaml = File(
"brokenyaml.yml",
UNITTESTDIR/"test_directories" / "test_yamls" / "brokenyaml.yml"
UNITTESTDIR / "test_directories" / "test_yamls" / "brokenyaml.yml"
)
with pytest.raises(yaml.parser.ParserError) as err:
yamlconverter.create_children(None, broken_yaml)
......@@ -379,7 +379,7 @@ def test_apply_transformers(converter_registry):
values["a"] = "a|b|c"
# transformer_functions = create_transformer_registry(crawler_definition)
transformer_functions = {"split": split}
transformer_functions = {"split": split}
conv = ListElementConverter(definition=cfood_def, name='test',
converter_registry=converter_registry)
......
......@@ -37,11 +37,11 @@ def test_handle_value():
def test_record_structure_generation():
dbt = DebugTree()
scan_directory(UNITTESTDIR/"test_directories" / "examples_article",
UNITTESTDIR/"cfoods_scalar.yml",
scan_directory(UNITTESTDIR / "test_directories" / "examples_article",
UNITTESTDIR / "cfoods_scalar.yml",
debug_tree=dbt)
subd = dbt.debug_tree[dircheckstr(
UNITTESTDIR/"test_directories" / "examples_article", "DataAnalysis")]
UNITTESTDIR / "test_directories" / "examples_article", "DataAnalysis")]
assert len(subd) == 2
# variables store on Data Analysis node of debug tree
if "Data" in subd[0]:
......
......@@ -41,7 +41,7 @@ from pytest import raises
from utils import dircheckstr as dircheckstr_base
UNITTESTDIR = Path(__file__).parent
dircheckstr = partial(dircheckstr_base, UNITTESTDIR/"test_directories" /
dircheckstr = partial(dircheckstr_base, UNITTESTDIR / "test_directories" /
"example_substitutions")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment