From f59b2b2b82e1871aaacdb9b7c4a11132f22b00cb Mon Sep 17 00:00:00 2001 From: Luke Van Seters Date: Mon, 9 Aug 2021 12:33:53 -0400 Subject: [PATCH] Test is_child_trace_address --- tests/test_traces.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/test_traces.py diff --git a/tests/test_traces.py b/tests/test_traces.py new file mode 100644 index 0000000..c0b7978 --- /dev/null +++ b/tests/test_traces.py @@ -0,0 +1,14 @@ +from mev_inspect.traces import is_child_trace_address + + +def test_is_child_trace_address(): + assert is_child_trace_address([0], []) + assert is_child_trace_address([0, 0], []) + assert is_child_trace_address([0, 0], [0]) + assert is_child_trace_address([100, 1, 10], [100]) + assert is_child_trace_address([100, 1, 10], [100, 1]) + + assert not is_child_trace_address([0], [1]) + assert not is_child_trace_address([1], [0]) + assert not is_child_trace_address([1, 0], [0]) + assert not is_child_trace_address([100, 2, 10], [100, 1])