11 lines
251 B
Python
11 lines
251 B
Python
import ast
|
|
|
|
from dbyaml.decorator import attribute_path
|
|
|
|
tree = ast.parse("alpha.beta().gamma").body[0].value # ty: ignore[unresolved-attribute]
|
|
|
|
|
|
def test_attribute_path():
|
|
path = attribute_path(tree)
|
|
assert path == ["alpha", "beta()", "gamma"]
|