Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
dokzai committed Feb 17, 2024
1 parent 9f255d8 commit b1c58ca
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions tests/e2e/printers/test_printers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,16 @@
def test_inheritance_printer(solc_binary_path) -> None:
solc_path = solc_binary_path("0.8.0")
standard_json = SolcStandardJson()
standard_json.add_source_file(
Path(TEST_DATA_DIR, "test_contract_names", "A.sol").as_posix()
)
standard_json.add_source_file(
Path(TEST_DATA_DIR, "test_contract_names", "B.sol").as_posix()
)
standard_json.add_source_file(
Path(TEST_DATA_DIR, "test_contract_names", "B2.sol").as_posix()
)
standard_json.add_source_file(
Path(TEST_DATA_DIR, "test_contract_names", "C.sol").as_posix()
)
standard_json.add_source_file(Path(TEST_DATA_DIR, "test_contract_names", "A.sol").as_posix())
standard_json.add_source_file(Path(TEST_DATA_DIR, "test_contract_names", "B.sol").as_posix())
standard_json.add_source_file(Path(TEST_DATA_DIR, "test_contract_names", "B2.sol").as_posix())
standard_json.add_source_file(Path(TEST_DATA_DIR, "test_contract_names", "C.sol").as_posix())
compilation = CryticCompile(standard_json, solc=solc_path)
slither = Slither(compilation)
printer = PrinterInheritanceGraph(slither=slither, logger=None)

output = printer.output('test_printer.dot')
content = output.elements[0]['name']['content']
output = printer.output("test_printer.dot")
content = output.elements[0]["name"]["content"]

pattern = re.compile(r"(?:c\d+_)?(\w+ -> )(?:c\d+_)(\w+)")
matches = re.findall(pattern, content)
Expand Down

0 comments on commit b1c58ca

Please sign in to comment.