Mercurial > kallithea
view pytest.ini @ 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 | afa5e0bdb76f |
children |
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 # --doctest-modules --doctest-ignore-import-errors