mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-14 21:10:27 -06:00
Fix appveyor and windows. Resolves #293
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user