mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 01:51:46 +04:00
Implement default_language_version
This commit is contained in:
parent
579b05e424
commit
d3b5a41830
23 changed files with 150 additions and 103 deletions
|
|
@ -53,13 +53,13 @@ def test_shebang_windows():
|
|||
|
||||
def test_shebang_otherwise():
|
||||
with mock.patch.object(sys, 'platform', 'posix'):
|
||||
assert 'default' not in shebang()
|
||||
assert C.DEFAULT not in shebang()
|
||||
|
||||
|
||||
def test_shebang_returns_default():
|
||||
with mock.patch.object(sys, 'platform', 'posix'):
|
||||
with mock.patch.object(
|
||||
python, 'get_default_version', return_value='default',
|
||||
python, 'get_default_version', return_value=C.DEFAULT,
|
||||
):
|
||||
assert shebang() == '#!/usr/bin/env python'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue