1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-09-25 06:32:37 +01:00

#N/A: Monkeypatch pathlib on windows

This commit is contained in:
Vladimir Iakovlev
2016-08-14 15:15:03 +03:00
parent 176924c18d
commit 621b455334
9 changed files with 27 additions and 14 deletions

View File

@@ -2,7 +2,7 @@
import pytest
from thefuck import corrector, const
from thefuck.utils import Path
from thefuck.system import Path
from tests.utils import Rule, Command, CorrectedCommand
from thefuck.corrector import get_corrected_commands, organize_commands
@@ -11,7 +11,7 @@ class TestGetRules(object):
@pytest.fixture
def glob(self, mocker):
results = {}
mocker.patch('thefuck.utils.Path.glob',
mocker.patch('thefuck.system.Path.glob',
new_callable=lambda: lambda *_: results.pop('value', []))
return lambda value: results.update({'value': value})