Created
March 14, 2024 13:21
-
-
Save gforsyth/b07799771dd530ee51ad6bc3068b25bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from xonsh.imphooks import XonshImportHook | |
from xonsh.execer import Execer | |
sys.meta_path.append(XonshImportHook(Execer())) | |
from tiny_scriptlet import * | |
def test_xonsh_function(): | |
assert xonsh_function() == "hello there" | |
def test_alias(): | |
assert $(hello).strip() == "hello there" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def xonsh_function(): | |
return $(echo hello there).strip() | |
aliases["hello"] = xonsh_function |
Author
gforsyth
commented
Mar 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment