summaryrefslogtreecommitdiff
path: root/parsing-tests
diff options
context:
space:
mode:
Diffstat (limited to 'parsing-tests')
-rwxr-xr-xparsing-tests/checks.py40
m---------parsing-tests/samples0
2 files changed, 0 insertions, 40 deletions
diff --git a/parsing-tests/checks.py b/parsing-tests/checks.py
deleted file mode 100755
index e53e28ca..00000000
--- a/parsing-tests/checks.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python3
-
-import json
-import os
-from deepdiff import DeepDiff
-from subprocess import Popen, PIPE
-
-
-# return dict with parse-result.
-def call_parser(xml_file):
- assert os.path.isfile(xml_file)
- xml_file_abs = os.path.abspath(xml_file)
- with Popen([
- "../gradlew",
- "--console=plain",
- "-q",
- "-p",
- "..",
- "nexus:run",
- f"--args=parse-camt {xml_file_abs}"],
- stdout=PIPE
- ) as proc:
- stdout = proc.communicate()[0]
- assert proc.returncode == 0
- return json.loads(stdout)
-
-def get_json_from_disk(json_file):
- json_file_abs = os.path.abspath(json_file)
- with open(json_file_abs) as j:
- return json.load(j)
-
-def test_dashed_subject():
- parsed = call_parser("./samples/camt53_example_dashed_subject.xml")
- expected = get_json_from_disk("./samples/camt53_example_dashed_subject.json")
- assert not DeepDiff(parsed, expected)
-
-def test_camt53_example3():
- parsed = call_parser("./samples/camt53_example3.xml")
- expected = get_json_from_disk("./samples/camt53_example3.json")
- assert not DeepDiff(parsed, expected)
diff --git a/parsing-tests/samples b/parsing-tests/samples
deleted file mode 160000
-Subproject 5b536593b9d84a9bb5ea2908aa2ab259d919930