mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
Fix legitimate builtins has no attribute __xonsh__ errors
This commit is contained in:
parent
0fe76b5329
commit
c7372342da
3 changed files with 5 additions and 3 deletions
|
@ -24,6 +24,8 @@ def test_indir():
|
|||
|
||||
|
||||
def test_rmtree():
|
||||
if ON_WINDOWS:
|
||||
pytest.skip("On Windows")
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
with indir(tmpdir):
|
||||
mkdir rmtree_test
|
||||
|
|
|
@ -15,7 +15,7 @@ from xonsh.ptk_shell.completer import PromptToolkitCompleter
|
|||
(RichCompletion('x'), 5, PTKCompletion(RichCompletion('x'), -5, 'x')),
|
||||
('x', 5, PTKCompletion('x', -5, 'x')),
|
||||
])
|
||||
def test_rich_completion(completion, lprefix, ptk_completion, monkeypatch):
|
||||
def test_rich_completion(completion, lprefix, ptk_completion, monkeypatch, xonsh_builtins):
|
||||
xonsh_completer_mock = MagicMock()
|
||||
xonsh_completer_mock.complete.return_value = {completion}, lprefix
|
||||
|
||||
|
|
|
@ -511,7 +511,7 @@ mom"""
|
|||
|
||||
|
||||
@pytest.mark.parametrize("src, idx, exp_line, exp_n", LOGICAL_LINE_CASES)
|
||||
def test_get_logical_line(src, idx, exp_line, exp_n):
|
||||
def test_get_logical_line(src, idx, exp_line, exp_n, xonsh_builtins):
|
||||
lines = src.splitlines()
|
||||
line, n, start = get_logical_line(lines, idx)
|
||||
assert exp_line == line
|
||||
|
@ -519,7 +519,7 @@ def test_get_logical_line(src, idx, exp_line, exp_n):
|
|||
|
||||
|
||||
@pytest.mark.parametrize("src, idx, exp_line, exp_n", LOGICAL_LINE_CASES)
|
||||
def test_replace_logical_line(src, idx, exp_line, exp_n):
|
||||
def test_replace_logical_line(src, idx, exp_line, exp_n, xonsh_builtins):
|
||||
lines = src.splitlines()
|
||||
logical = exp_line
|
||||
while idx > 0 and lines[idx - 1].endswith("\\"):
|
||||
|
|
Loading…
Add table
Reference in a new issue