Fix test since pip 10 changed output

This commit is contained in:
Anthony Sottile
2018-05-21 21:38:36 -07:00
parent 3555a2b158
commit f88e007f52
4 changed files with 18 additions and 48 deletions

View File

@@ -1,6 +0,0 @@
- id: foo
name: Foo
entry: foo
language: python
language_version: python2.7
files: \.py$

View File

@@ -1,17 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
import sys
def main():
# Intentionally write mixed encoding to the output. This should not crash
# pre-commit and should write bytes to the output.
sys.stderr.write(''.encode('UTF-8') + '²'.encode('latin1') + b'\n')
# Return 1 to indicate failures
return 1
if __name__ == '__main__':
exit(main())