fail if artifact does not existing (#1947)

pull/1961/head
alpharush 1 year ago committed by GitHub
parent c8d20acca6
commit fc9377d28c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      tests/e2e/solc_parsing/test_ast_parsing.py
  2. 5
      tests/e2e/solc_parsing/test_data/expected/yul-top-level-0.8.0.sol-0.8.0-compact.json

@ -495,12 +495,9 @@ class TestASTParsing:
actual = generate_output(sl)
try:
with open(expected, "r", encoding="utf8") as f:
expected = json.load(f)
except OSError:
pytest.xfail("the file for this test was not generated")
raise
assert os.path.isfile(expected), f"Expected file {expected} does not exist"
with open(expected, "r", encoding="utf8") as f:
expected = json.load(f)
diff = DeepDiff(expected, actual, ignore_order=True, verbose_level=2, view="tree")
if diff:

@ -0,0 +1,5 @@
{
"Test": {
"test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n"
}
}
Loading…
Cancel
Save