xonsh/tests/test_lazyasd.py

12 lines
214 B
Python
Raw Normal View History

2016-06-27 20:53:10 -04:00
"""Tests lazy and self destruictive objects."""
from xonsh.lazyasd import LazyObject
#
# LazyObject Tests
#
2018-08-30 09:18:49 -05:00
def test_lazyobject_getitem():
lo = LazyObject(lambda: {"x": 1}, {}, "lo")
assert 1 == lo["x"]