mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
![pre-commit-ci[bot]](/assets/img/avatar_default.png)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black: 23.12.1 → 24.1.1](https://github.com/psf/black/compare/23.12.1...24.1.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
12 lines
215 B
Python
12 lines
215 B
Python
"""Tests lazy and self destruictive objects."""
|
|
|
|
from xonsh.lazyasd import LazyObject
|
|
|
|
#
|
|
# LazyObject Tests
|
|
#
|
|
|
|
|
|
def test_lazyobject_getitem():
|
|
lo = LazyObject(lambda: {"x": 1}, {}, "lo")
|
|
assert 1 == lo["x"]
|