mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 00:14:41 +01:00

To have clear `./xonsh` directory with the list of components we need to move common packages that are not components of xonsh to lib directory. cc #5538 I see that `lib.os` and `lib.subprocess` have a bit different intention. I think more clearer will be put them to `xonsh.api`. This is the first step to #5383. ## 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>
13 lines
240 B
Python
13 lines
240 B
Python
from xonsh.lib.itertools import as_iterable
|
|
|
|
|
|
def test_single():
|
|
assert as_iterable(1) == (1,)
|
|
|
|
|
|
def test_list():
|
|
assert as_iterable([1, 2, 3]) == [1, 2, 3]
|
|
|
|
|
|
def test_string():
|
|
assert as_iterable("my string") == ("my string",)
|