mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Fix appveyor and windows. Resolves #293
This commit is contained in:
parent
1cdbe38b5f
commit
248930f6dc
7 changed files with 60 additions and 34 deletions
18
tests/languages/python_test.py
Normal file
18
tests/languages/python_test.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
|
||||
from pre_commit.languages import python
|
||||
|
||||
|
||||
def test_norm_version_expanduser():
|
||||
home = os.path.expanduser('~')
|
||||
if os.name == 'nt': # pragma: no cover (nt)
|
||||
path = r'~\python343'
|
||||
expected_path = r'{0}\python343'.format(home)
|
||||
else: # pragma: no cover (non-nt)
|
||||
path = '~/.pyenv/versions/3.4.3/bin/python'
|
||||
expected_path = home + '/.pyenv/versions/3.4.3/bin/python'
|
||||
result = python.norm_version(path)
|
||||
assert result == expected_path
|
||||
Loading…
Add table
Add a link
Reference in a new issue