mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Merge pull request #2164 from pre-commit/py2-cleanup
minor py2 cleanup for sys.stderr.buffer
This commit is contained in:
commit
de177e8850
3 changed files with 5 additions and 5 deletions
|
|
@ -1,3 +1,3 @@
|
||||||
FROM cogniteev/echo
|
FROM ubuntu:focal
|
||||||
|
|
||||||
CMD ["echo", "This is overwritten by the .pre-commit-hooks.yaml 'entry'"]
|
CMD ["echo", "This is overwritten by the .pre-commit-hooks.yaml 'entry'"]
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
- id: echo-entrypoint
|
- id: echo-entrypoint
|
||||||
name: echo (via --entrypoint)
|
name: echo (via --entrypoint)
|
||||||
language: docker_image
|
language: docker_image
|
||||||
entry: --entrypoint echo cogniteev/echo
|
entry: --entrypoint echo ubuntu:focal
|
||||||
- id: echo-cmd
|
- id: echo-cmd
|
||||||
name: echo (via cmd)
|
name: echo (via cmd)
|
||||||
language: docker_image
|
language: docker_image
|
||||||
entry: cogniteev/echo echo
|
entry: ubuntu:focal echo
|
||||||
|
|
|
||||||
|
|
@ -72,8 +72,8 @@ def test_basic_healthy():
|
||||||
def test_failed_setup_command_does_not_unicode_error():
|
def test_failed_setup_command_does_not_unicode_error():
|
||||||
script = (
|
script = (
|
||||||
'import sys\n'
|
'import sys\n'
|
||||||
"getattr(sys.stderr, 'buffer', sys.stderr).write(b'\\x81\\xfe')\n"
|
"sys.stderr.buffer.write(b'\\x81\\xfe')\n"
|
||||||
'exit(1)\n'
|
'raise SystemExit(1)\n'
|
||||||
)
|
)
|
||||||
|
|
||||||
# an assertion that this does not raise `UnicodeError`
|
# an assertion that this does not raise `UnicodeError`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue