mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 09:04:41 +04:00
Implement a simplified xargs in python
This commit is contained in:
parent
a5b56bd9e3
commit
b7d395410b
13 changed files with 130 additions and 62 deletions
|
|
@ -1,16 +0,0 @@
|
|||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from pre_commit.languages.helpers import file_args_to_stdin
|
||||
|
||||
|
||||
def test_file_args_to_stdin_empty():
|
||||
assert file_args_to_stdin([]) == ''
|
||||
|
||||
|
||||
def test_file_args_to_stdin_some():
|
||||
assert file_args_to_stdin(['foo', 'bar']) == 'foo\0bar\0'
|
||||
|
||||
|
||||
def test_file_args_to_stdin_tuple():
|
||||
assert file_args_to_stdin(('foo', 'bar')) == 'foo\0bar\0'
|
||||
Loading…
Add table
Add a link
Reference in a new issue