mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00

#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>
12 lines
219 B
Python
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"]
|