Mercurial > kallithea
view .coveragerc @ 8300:9d3ac5963e4e
diff: fix two-way diff for added or removed files
Viewing the two-way diff of an added file gives following exception:
File "_base_root_html", line 211, in render_body
File "_base_base_html", line 42, in render_body
File "files_diff_2way_html", line 197, in render_main
File ".../kallithea/lib/vcs/nodes.py", line 411, in is_binary
return b'\0' in self.content
TypeError: 'in <string>' requires string as left operand, not bytes
At this point, self.content was '' (empty string).
Commit 9203621cae03a03bbf8cfb4b667daa656780a93e made that node content is
always bytes, but this also had to be reflected in EmptyChangeset.
Add a basic test that catches this behavior.
author | Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> |
---|---|
date | Wed, 25 Mar 2020 16:24:26 +0100 |
parents | 4b241f198cf2 |
children | d332fca29474 |
line wrap: on
line source
[run] omit = # the bin scripts are not part of the Kallithea web app kallithea/bin/* # we ship with no active extensions kallithea/config/rcextensions/* # dbmigrate is not a part of the Kallithea web app kallithea/lib/dbmigrate/* # the tests themselves should not be part of the coverage report kallithea/tests/* # the scm hooks are not run in the kallithea process kallithea/config/post_receive_tmpl.py kallithea/config/pre_receive_tmpl.py # same omit lines should be present in sections 'run' and 'report' [report] omit = # the bin scripts are not part of the Kallithea web app kallithea/bin/* # we ship with no active extensions kallithea/config/rcextensions/* # dbmigrate is not a part of the Kallithea web app kallithea/lib/dbmigrate/* # the tests themselves should not be part of the coverage report kallithea/tests/* # the scm hooks are not run in the kallithea process kallithea/config/post_receive_tmpl.py kallithea/config/pre_receive_tmpl.py [paths] source = kallithea/ **/workspace/*/kallithea