xonsh/tests/test_bashisms.py
Anthony Scopatz 634a8ec9f2 black tests
2018-08-30 09:18:49 -05:00

12 lines
353 B
Python

"""Tests bashisms xontrib."""
import pytest
@pytest.mark.parametrize("inp, exp", [("x = 42", "x = 42"), ("!!", "ls")])
def test_preproc(inp, exp, xonsh_builtins):
"""Test the bash preprocessor."""
from xontrib.bashisms import bash_preproc
xonsh_builtins.__xonsh_history__.inps = ["ls\n"]
obs = bash_preproc(inp)
assert exp == obs