Skip to content

Tests fail when running as pre-commit step (but pass otherwise) #25

Closed

Description

@asottile
(py_env)asottile@asottile-Parallels-Virtual-Platform:~/workspace/pre-commit$ git commit --allow-empty -m "derp"
Trimming trailing whitespace...
Fixing line endings...
Py    - Pyflakes........................................................................................................................................................Success
Py    - ipdb............................................................................................................................................................Success
Py    - Test files should end in _test.py...............................................................................................................................Success
Py    - Use s.splitlines over s.split...................................................................................................................................Success
All   - No tabs.........................................................................................................................................................Success
Py    - Tests........................................................................................................................................................Failure(2)

rm -rf py_env
virtualenv py_env
New python executable in py_env/bin/python
Installing Setuptools..............................................................................................................................................................................................................................done.
Installing Pip.....................................................................................................................................................................................................................................................................................................................................done.
bash -c 'source py_env/bin/activate && \
        pip install -e . && \
        pip install -r requirements.txt'
Obtaining file:///home/asottile/workspace/pre-commit
  Running setup.py egg_info for package from file:///home/asottile/workspace/pre-commit
    deleting pre_commit.egg-info/entry_points.txt

Requirement already satisfied (use --upgrade to upgrade): argparse in /usr/lib/python2.7 (from pre-commit==0.0.0)
Downloading/unpacking plumbum (from pre-commit==0.0.0)
  Running setup.py egg_info for package plumbum

Downloading/unpacking simplejson (from pre-commit==0.0.0)
  Running setup.py egg_info for package simplejson

Installing collected packages: plumbum, simplejson, pre-commit
  Running setup.py install for plumbum

  Running setup.py install for simplejson
    building 'simplejson._speedups' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c simplejson/_speedups.c -o build/temp.linux-x86_64-2.7/simplejson/_speedups.o
    gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/simplejson/_speedups.o -o build/lib.linux-x86_64-2.7/simplejson/_speedups.so

  Running setup.py develop for pre-commit

    Creating /home/asottile/workspace/pre-commit/py_env/lib/python2.7/site-packages/pre-commit.egg-link (link to .)
    Adding pre-commit 0.0.0 to easy-install.pth file

    Installed /home/asottile/workspace/pre-commit
Successfully installed plumbum simplejson pre-commit
Cleaning up...
Requirement already satisfied (use --upgrade to upgrade): argparse in /usr/lib/python2.7 (from -r requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): plumbum in ./py_env/lib/python2.7/site-packages (from -r requirements.txt (line 2))
Downloading/unpacking pyyaml (from -r requirements.txt (line 3))
  Running setup.py egg_info for package pyyaml

Requirement already satisfied (use --upgrade to upgrade): simplejson in ./py_env/lib/python2.7/site-packages (from -r requirements.txt (line 4))
Downloading/unpacking coverage (from -r requirements.txt (line 7))
  Running setup.py egg_info for package coverage

    warning: no previously-included files matching '*.pyc' found anywhere in distribution
Downloading/unpacking ipdb (from -r requirements.txt (line 8))
  Downloading ipdb-0.8.zip
  Running setup.py egg_info for package ipdb

Downloading/unpacking mock (from -r requirements.txt (line 9))
  Running setup.py egg_info for package mock

    warning: no files found matching '*.png' under directory 'docs'
    warning: no files found matching '*.css' under directory 'docs'
    warning: no files found matching '*.html' under directory 'docs'
    warning: no files found matching '*.js' under directory 'docs'
Downloading/unpacking pyflakes (from -r requirements.txt (line 10))
  Downloading pyflakes-0.7.3.tar.gz
  Running setup.py egg_info for package pyflakes

Downloading/unpacking pytest (from -r requirements.txt (line 11))
  Running setup.py egg_info for package pytest

Downloading/unpacking ipython>=0.10 (from ipdb->-r requirements.txt (line 8))
  Running setup.py egg_info for package ipython

Downloading/unpacking py>=1.4.20 (from pytest->-r requirements.txt (line 11))
  Running setup.py egg_info for package py

Installing collected packages: pyyaml, coverage, ipdb, mock, pyflakes, pytest, ipython, py
  Running setup.py install for pyyaml
    checking if libyaml is compilable
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/check_libyaml.c -o build/temp.linux-x86_64-2.7/check_libyaml.o
    checking if libyaml is linkable
    gcc -pthread build/temp.linux-x86_64-2.7/check_libyaml.o -lyaml -o build/temp.linux-x86_64-2.7/check_libyaml
    building '_yaml' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c ext/_yaml.c -o build/temp.linux-x86_64-2.7/ext/_yaml.o
    In file included from ext/_yaml.c:223:0:
    ext/_yaml.h:6:0: warning: "PyUnicode_FromString" redefined [enabled by default]
    /usr/include/python2.7/unicodeobject.h:281:0: note: this is the location of the previous definition
    ext/_yaml.c: In function ‘__pyx_pf_5_yaml_get_version_string’:
    ext/_yaml.c:1145:17: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
    ext/_yaml.c: In function ‘__pyx_pf_5_yaml_7CParser___init__’:
    ext/_yaml.c:2074:38: warning: passing argument 2 of ‘yaml_parser_set_input’ from incompatible pointer type [enabled by default]
    /usr/include/yaml.h:1367:1: note: expected ‘int (*)(void *, unsigned char *, size_t,  size_t *)’ but argument is of type ‘int (*)(void *, char *, int,  int *)’
    ext/_yaml.c:2272:45: warning: pointer targets in passing argument 2 of ‘yaml_parser_set_input_string’ differ in signedness [-Wpointer-sign]
    /usr/include/yaml.h:1341:1: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
    ext/_yaml.c: In function ‘__pyx_f_5_yaml_7CParser__token_to_object’:
    ext/_yaml.c:3705:5: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:3705:5: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:3718:5: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:3718:5: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:4285:5: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:4285:5: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:4339:5: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:4339:5: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:4393:5: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:4393:5: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:4406:5: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:4406:5: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:4493:5: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c: In function ‘__pyx_f_5_yaml_7CParser__event_to_object’:
    ext/_yaml.c:5909:9: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:5909:9: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:5922:9: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:5922:9: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:6088:5: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:6088:5: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:6163:7: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:6163:7: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:6200:7: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:6200:7: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:6216:5: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:6520:7: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:6520:7: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:6557:7: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:6557:7: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:6747:7: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:6747:7: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:6784:7: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:6784:7: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c: In function ‘__pyx_f_5_yaml_7CParser__compose_node’:
    ext/_yaml.c:8064:5: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:8064:5: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:8284:5: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:8284:5: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:8315:5: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:8315:5: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:8346:5: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:8346:5: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c: In function ‘__pyx_f_5_yaml_7CParser__compose_scalar_node’:
    ext/_yaml.c:8861:3: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:9019:5: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:9019:5: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c: In function ‘__pyx_f_5_yaml_7CParser__compose_sequence_node’:
    ext/_yaml.c:9461:5: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:9461:5: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c: In function ‘__pyx_f_5_yaml_7CParser__compose_mapping_node’:
    ext/_yaml.c:9998:5: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c:9998:5: warning: pointer targets in passing argument 1 of ‘PyUnicodeUCS4_DecodeUTF8’ differ in signedness [-Wpointer-sign]
    /usr/include/python2.7/unicodeobject.h:750:23: note: expected ‘const char *’ but argument is of type ‘yaml_char_t *’
    ext/_yaml.c: In function ‘__pyx_pf_5_yaml_8CEmitter___init__’:
    ext/_yaml.c:11065:38: warning: passing argument 2 of ‘yaml_emitter_set_output’ from incompatible pointer type [enabled by default]
    /usr/include/yaml.h:1829:1: note: expected ‘int (*)(void *, unsigned char *, size_t)’ but argument is of type ‘int (*)(void *, char *, int)’
    ext/_yaml.c: In function ‘__pyx_f_5_yaml_8CEmitter__object_to_event’:
    ext/_yaml.c:12199:44: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
    ext/_yaml.c:12300:44: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
    ext/_yaml.c:12563:5: warning: pointer targets in passing argument 2 of ‘yaml_alias_event_initialize’ differ in signedness [-Wpointer-sign]
    /usr/include/yaml.h:553:1: note: expected ‘yaml_char_t *’ but argument is of type ‘char *’
    ext/_yaml.c:13168:5: warning: pointer targets in passing argument 2 of ‘yaml_scalar_event_initialize’ differ in signedness [-Wpointer-sign]
    /usr/include/yaml.h:578:1: note: expected ‘yaml_char_t *’ but argument is of type ‘char *’
    ext/_yaml.c:13168:5: warning: pointer targets in passing argument 3 of ‘yaml_scalar_event_initialize’ differ in signedness [-Wpointer-sign]
    /usr/include/yaml.h:578:1: note: expected ‘yaml_char_t *’ but argument is of type ‘char *’
    ext/_yaml.c:13168:5: warning: pointer targets in passing argument 4 of ‘yaml_scalar_event_initialize’ differ in signedness [-Wpointer-sign]
    /usr/include/yaml.h:578:1: note: expected ‘yaml_char_t *’ but argument is of type ‘char *’
    ext/_yaml.c:13521:5: warning: pointer targets in passing argument 2 of ‘yaml_sequence_start_event_initialize’ differ in signedness [-Wpointer-sign]
    /usr/include/yaml.h:601:1: note: expected ‘yaml_char_t *’ but argument is of type ‘char *’
    ext/_yaml.c:13521:5: warning: pointer targets in passing argument 3 of ‘yaml_sequence_start_event_initialize’ differ in signedness [-Wpointer-sign]
    /usr/include/yaml.h:601:1: note: expected ‘yaml_char_t *’ but argument is of type ‘char *’
    ext/_yaml.c:13874:5: warning: pointer targets in passing argument 2 of ‘yaml_mapping_start_event_initialize’ differ in signedness [-Wpointer-sign]
    /usr/include/yaml.h:633:1: note: expected ‘yaml_char_t *’ but argument is of type ‘char *’
    ext/_yaml.c:13874:5: warning: pointer targets in passing argument 3 of ‘yaml_mapping_start_event_initialize’ differ in signedness [-Wpointer-sign]
    /usr/include/yaml.h:633:1: note: expected ‘yaml_char_t *’ but argument is of type ‘char *’
    ext/_yaml.c: In function ‘__pyx_pf_5_yaml_8CEmitter_6serialize’:
    ext/_yaml.c:15082:42: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
    ext/_yaml.c:15183:42: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
    ext/_yaml.c: In function ‘__pyx_f_5_yaml_8CEmitter__serialize_node’:
    ext/_yaml.c:15863:5: warning: pointer targets in passing argument 2 of ‘yaml_alias_event_initialize’ differ in signedness [-Wpointer-sign]
    /usr/include/yaml.h:553:1: note: expected ‘yaml_char_t *’ but argument is of type ‘char *’
    ext/_yaml.c:16500:7: warning: pointer targets in passing argument 2 of ‘yaml_scalar_event_initialize’ differ in signedness [-Wpointer-sign]
    /usr/include/yaml.h:578:1: note: expected ‘yaml_char_t *’ but argument is of type ‘char *’
    ext/_yaml.c:16500:7: warning: pointer targets in passing argument 3 of ‘yaml_scalar_event_initialize’ differ in signedness [-Wpointer-sign]
    /usr/include/yaml.h:578:1: note: expected ‘yaml_char_t *’ but argument is of type ‘char *’
    ext/_yaml.c:16500:7: warning: pointer targets in passing argument 4 of ‘yaml_scalar_event_initialize’ differ in signedness [-Wpointer-sign]
    /usr/include/yaml.h:578:1: note: expected ‘yaml_char_t *’ but argument is of type ‘char *’
    ext/_yaml.c:16790:7: warning: pointer targets in passing argument 2 of ‘yaml_sequence_start_event_initialize’ differ in signedness [-Wpointer-sign]
    /usr/include/yaml.h:601:1: note: expected ‘yaml_char_t *’ but argument is of type ‘char *’
    ext/_yaml.c:16790:7: warning: pointer targets in passing argument 3 of ‘yaml_sequence_start_event_initialize’ differ in signedness [-Wpointer-sign]
    /usr/include/yaml.h:601:1: note: expected ‘yaml_char_t *’ but argument is of type ‘char *’
    ext/_yaml.c:17193:7: warning: pointer targets in passing argument 2 of ‘yaml_mapping_start_event_initialize’ differ in signedness [-Wpointer-sign]
    /usr/include/yaml.h:633:1: note: expected ‘yaml_char_t *’ but argument is of type ‘char *’
    ext/_yaml.c:17193:7: warning: pointer targets in passing argument 3 of ‘yaml_mapping_start_event_initialize’ differ in signedness [-Wpointer-sign]
    /usr/include/yaml.h:633:1: note: expected ‘yaml_char_t *’ but argument is of type ‘char *’
    gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/ext/_yaml.o -lyaml -o build/lib.linux-x86_64-2.7/_yaml.so

  Running setup.py install for coverage
    building 'coverage.tracer' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c coverage/tracer.c -o build/temp.linux-x86_64-2.7/coverage/tracer.o
    gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/coverage/tracer.o -o build/lib.linux-x86_64-2.7/coverage/tracer.so

    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    Installing coverage2 script to /home/asottile/workspace/pre-commit/py_env/bin
    Installing coverage-2.7 script to /home/asottile/workspace/pre-commit/py_env/bin
    Installing coverage script to /home/asottile/workspace/pre-commit/py_env/bin
  Running setup.py install for ipdb

    Installing ipdb script to /home/asottile/workspace/pre-commit/py_env/bin
  Running setup.py install for mock

    warning: no files found matching '*.png' under directory 'docs'
    warning: no files found matching '*.css' under directory 'docs'
    warning: no files found matching '*.html' under directory 'docs'
    warning: no files found matching '*.js' under directory 'docs'
  Running setup.py install for pyflakes

    Installing pyflakes script to /home/asottile/workspace/pre-commit/py_env/bin
  Running setup.py install for pytest

    Installing py.test script to /home/asottile/workspace/pre-commit/py_env/bin
    Installing py.test-2.7 script to /home/asottile/workspace/pre-commit/py_env/bin
  Running setup.py install for ipython

    Installing ipcontroller script to /home/asottile/workspace/pre-commit/py_env/bin
    Installing iptest script to /home/asottile/workspace/pre-commit/py_env/bin
    Installing ipcluster script to /home/asottile/workspace/pre-commit/py_env/bin
    Installing ipython script to /home/asottile/workspace/pre-commit/py_env/bin
    Installing pycolor script to /home/asottile/workspace/pre-commit/py_env/bin
    Installing iplogger script to /home/asottile/workspace/pre-commit/py_env/bin
    Installing irunner script to /home/asottile/workspace/pre-commit/py_env/bin
    Installing ipengine script to /home/asottile/workspace/pre-commit/py_env/bin
  Running setup.py install for py

Successfully installed pyyaml coverage ipdb mock pyflakes pytest ipython py
Cleaning up...
bash -c 'source py_env/bin/activate && py.test tests -m "not(integration)"'
============================= test session starts ==============================
platform linux2 -- Python 2.7.3 -- py-1.4.20 -- pytest-2.5.2
collected 4 items

tests/git_test.py F...

=================================== FAILURES ===================================
________________________________ test_get_root _________________________________

empty_git_dir = '/tmp/pytest-4/test_get_root0'

    def test_get_root(empty_git_dir):
        assert git.get_root() == empty_git_dir

        foo = local.path('foo')
        foo.mkdir()

        with in_dir(foo):
>           assert git.get_root() == empty_git_dir

/home/asottile/workspace/pre-commit/tests/git_test.py:34: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def get_root():
>       return local['git']['rev-parse', '--show-toplevel']().strip()

/home/asottile/workspace/pre-commit/pre_commit/git.py:7: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = BoundCommand(LocalCommand(<LocalPath /usr/lib/git-core/git>), ['rev-parse', '--show-toplevel'])
args = (), kwargs = {}

    def __call__(self, *args, **kwargs):
        """A shortcut for `run(args)`, returning only the process' stdout"""
>       return self.run(args, **kwargs)[1]

/home/asottile/workspace/pre-commit/py_env/local/lib/python2.7/site-packages/plumbum/commands/base.py:90: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = BoundCommand(LocalCommand(<LocalPath /usr/lib/git-core/git>), ['rev-parse', '--show-toplevel'])
args = (), kwargs = {}, p = <subprocess.Popen object at 0x2cf2f90>

    def run(self, args = (), **kwargs):
        """Runs the given command (equivalent to popen() followed by
            :func:`run_proc <plumbum.commands.run_proc>`). If the exit code of the process does
            not match the expected one, :class:`ProcessExecutionError
            <plumbum.commands.ProcessExecutionError>` is raised.

            :param args: Any arguments to be passed to the process (a tuple)

            :param retcode: The expected return code of this process (defaults to 0).
                            In order to disable exit-code validation, pass ``None``. It may also
                            be a tuple (or any iterable) of expected exit codes.

                            .. note:: this argument must be passed as a keyword argument.

            :param timeout: The maximal amount of time (in seconds) to allow the process to run.
                            ``None`` means no timeout is imposed; otherwise, if the process hasn't
                            terminated after that many seconds, the process will be forcefully
                            terminated an exception will be raised

                            .. note:: this argument must be passed as a keyword argument.

            :param kwargs: Any keyword-arguments to be passed to the ``Popen`` constructor

            :returns: A tuple of (return code, stdout, stderr)
            """
        with self.bgrun(args, **kwargs) as p:
>           return p.run()

/home/asottile/workspace/pre-commit/py_env/local/lib/python2.7/site-packages/plumbum/commands/base.py:213: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def runner():
        if was_run[0]:
            return  # already done
        was_run[0] = True
        try:
>           return run_proc(p, retcode, timeout)

/home/asottile/workspace/pre-commit/py_env/local/lib/python2.7/site-packages/plumbum/commands/base.py:176: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

proc = <subprocess.Popen object at 0x2cf2f90>, retcode = 0, timeout = None

    def run_proc(proc, retcode, timeout = None):
        """Waits for the given process to terminate, with the expected exit code

        :param proc: a running Popen-like object

        :param retcode: the expected return (exit) code of the process. It defaults to 0 (the
                        convention for success). If ``None``, the return code is ignored.
                        It may also be a tuple (or any object that supports ``__contains__``)
                        of expected return codes.

        :param timeout: the number of seconds (a ``float``) to allow the process to run, before
                        forcefully terminating it. If ``None``, not timeout is imposed; otherwise
                        the process is expected to terminate within that timeout value, or it will
                        be killed and :class:`ProcessTimedOut <plumbum.cli.ProcessTimedOut>`
                        will be raised

        :returns: A tuple of (return code, stdout, stderr)
        """
        if timeout is not None:
            _timeout_queue.put((proc, time.time() + timeout))
        stdout, stderr = proc.communicate()
        proc._end_time = time.time()
        if not stdout:
            stdout = six.b("")
        if not stderr:
            stderr = six.b("")
        if getattr(proc, "encoding", None):
            stdout = stdout.decode(proc.encoding, "ignore")
            stderr = stderr.decode(proc.encoding, "ignore")

        if getattr(proc, "_timed_out", False):
            raise ProcessTimedOut("Process did not terminate within %s seconds" % (timeout,),
                getattr(proc, "argv", None))

        if retcode is not None:
            if hasattr(retcode, "__contains__"):
                if proc.returncode not in retcode:
                    raise ProcessExecutionError(getattr(proc, "argv", None), proc.returncode,
                        stdout, stderr)
            elif proc.returncode != retcode:
                raise ProcessExecutionError(getattr(proc, "argv", None), proc.returncode,
>                   stdout, stderr)
E               ProcessExecutionError: Command line: ['/usr/lib/git-core/git', 'rev-parse', '--show-toplevel']
E               Exit code: 128
E               Stderr:  | fatal: Not a git repository: '.git'

/home/asottile/workspace/pre-commit/py_env/local/lib/python2.7/site-packages/plumbum/commands/processes.py:207: ProcessExecutionError
====================== 1 failed, 3 passed in 0.09 seconds ======================
make: *** [_tests] Error 1

Failures / Fixes detected.
Please fix and commit again.
You could also pass --no-verify, but you probably shouldn't.

Here's git status for convenience: 

# On branch herp
nothing to commit (working directory clean)

Activity

  1. asottile commented on Mar 17, 2014

    @asottile
    MemberAuthor

    Fixed by implementing our own version of git rev-parse --top-level

  2. hui61 commented on Jan 6, 2020

    @hui61

    Hi, I met this error when I commit code. What does your solution "git rev-parse --top-level" mean ?

  3. asottile commented on Jan 6, 2020

    @asottile
    MemberAuthor

    hello @hui61, this issue is very very old and almost certainly not what you're hitting -- please open a new issue with a reproduction, version information, configuration (and test repository if available) -- thanks!

  4. added a commit that references this issue on Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions