fix test_unexisting_path on windows

This commit is contained in:
Xavier Fernandez 2015-12-01 13:07:19 +01:00
parent b939c3d6d2
commit d459969b03
1 changed files with 2 additions and 1 deletions

View File

@ -452,7 +452,8 @@ class TestInstallRequirement(object):
def test_unexisting_path(self):
with pytest.raises(InstallationError) as e:
InstallRequirement.from_line('/this/path/does/not/exist')
InstallRequirement.from_line(
os.path.join('this', 'path', 'does', 'not', 'exist'))
err_msg = e.value.args[0]
assert "Invalid requirement" in err_msg
assert "It looks like a path. Does it exist ?" in err_msg