xonsh/tests/lib/test_lazyasd.py
Andy Kipp 2788ae3308
refactoring: move lazy to lib (#5560)
#5538

## For community
⬇️ **Please click the 👍 reaction instead of leaving a `+1` or 👍
comment**

---------

Co-authored-by: a <1@1.1>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-06-29 12:19:08 +02:00

12 lines
219 B
Python

"""Tests lazy and self destruictive objects."""
from xonsh.lib.lazyasd import LazyObject
#
# LazyObject Tests
#
def test_lazyobject_getitem():
lo = LazyObject(lambda: {"x": 1}, {}, "lo")
assert 1 == lo["x"]