From 69db5c70e6ba9cc5af2910f08a6e2c4421397ead Mon Sep 17 00:00:00 2001 From: Pablo Santiago Blum de Aguiar Date: Tue, 29 Mar 2016 23:10:59 -0300 Subject: [PATCH] #486: Fix path joining on Windows --- tests/test_types.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_types.py b/tests/test_types.py index dcb4e874..2909412e 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -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),