mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-31 02:01:13 +00:00
#486: Fix path joining on Windows
This commit is contained in:
parent
fa1edd4bae
commit
69db5c70e6
@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from subprocess import PIPE
|
||||
from mock import Mock
|
||||
from pathlib import Path
|
||||
@ -39,9 +40,10 @@ class TestRule(object):
|
||||
enabled_by_default=True,
|
||||
priority=900,
|
||||
requires_output=True))
|
||||
assert Rule.from_path(Path('/rules/bash.py')) \
|
||||
rule_path = os.path.join(os.sep, 'rules', 'bash.py')
|
||||
assert Rule.from_path(Path(rule_path)) \
|
||||
== Rule('bash', match, get_new_command, priority=900)
|
||||
load_source.assert_called_once_with('bash', '/rules/bash.py')
|
||||
load_source.assert_called_once_with('bash', rule_path)
|
||||
|
||||
@pytest.mark.parametrize('rules, exclude_rules, rule, is_enabled', [
|
||||
(const.DEFAULT_RULES, [], Rule('git', enabled_by_default=True), True),
|
||||
|
Loading…
x
Reference in New Issue
Block a user