Mercurial > kallithea
view pytest.ini @ 6949:5395bb85a991
diff: fix crash when displaying diff on a single file
File diff on an image file would fail on
%if op in 'DM':
because op was None:
TypeError: 'in <string>' requires string as left operand, not NoneType
But really, if op is None, we also don't want to show invalid "Show images"
links. Thus, guard the whole image display section with having an actual op.
_parse_gitdiff will never return op None, but wrapped_diff is more lazy and
might do that. It could be considered a bug in wrapped_diff, and this change is
just a bad workaround.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 23 Oct 2017 01:15:06 +0200 |
parents | d88077fae3d6 |
children | afa5e0bdb76f |
line wrap: on
line source
[pytest] # only look for tests in kallithea/tests python_files = kallithea/tests/**/test_*.py addopts = # --verbose # show extra test summary info as specified by chars (f)ailed, (E)error, (s)skipped, (x)failed, (X)passed, (w)warnings. -rfEsxXw # Shorter scrollbacks; less stuff to scroll through --tb=short