Tests pass on windows

This commit is contained in:
Anthony Sottile 2015-01-18 19:45:44 -08:00
parent 56e5c4eb2d
commit 143ed94500
21 changed files with 224 additions and 109 deletions

View file

@ -8,13 +8,16 @@ from pre_commit import five
# TODO: smell: import side-effects
COLS = int(
subprocess.Popen(
['tput', 'cols'], stdout=subprocess.PIPE,
).communicate()[0] or
# Default in the case of no terminal
80
)
try:
COLS = int(
subprocess.Popen(
['tput', 'cols'], stdout=subprocess.PIPE,
).communicate()[0] or
# Default in the case of no terminal
80
)
except OSError: # pragma: no cover (windows)
COLS = 80
def get_hook_message(