Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_Node_custom_length():
root = Node.create(length='1e2', length_parser=lambda l: l + 'i')
assert root.length == '1e2i'
root = Node.create(length_formatter=lambda l: 5)
root.length = 10
assert root.length == pytest.approx(5)
def test_Node_custom_length():
root = Node.create(length='1e2', length_parser=lambda l: l + 'i')
assert root.length == '1e2i'
root = Node.create(length_formatter=lambda l: 5)
root.length = 10
assert root.length == pytest.approx(5)