Mercurial > public > mercurial-scm > hg-stable
diff tests/test-filelog.py @ 43076:2372284d9457
formatting: blacken the codebase
This is using my patch to black
(https://github.com/psf/black/pull/826) so we don't un-wrap collection
literals.
Done with:
hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"' | xargs black -S
# skip-blame mass-reformatting only
# no-check-commit reformats foo_bar functions
Differential Revision: https://phab.mercurial-scm.org/D6971
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 06 Oct 2019 09:45:02 -0400 |
parents | f71c97d9b97b |
children | c102b704edb5 |
line wrap: on
line diff
--- a/tests/test-filelog.py Sat Oct 05 10:29:34 2019 -0400 +++ b/tests/test-filelog.py Sun Oct 06 09:45:02 2019 -0400 @@ -18,6 +18,7 @@ fl = repo.file(b'foobar') + def addrev(text, renamed=False): if renamed: # data doesn't matter. Just make sure filelog.renamed() returns True @@ -37,9 +38,11 @@ if lock: lock.release() + def error(text): print('ERROR: ' + text) + textwith = b'\1\nfoo' without = b'foo' @@ -49,8 +52,10 @@ if fl.cmp(node, textwith) or not fl.cmp(node, without): error('filelog.cmp for data starting with \\1\\n') if fl.size(0) != len(textwith): - error('FIXME: This is a known failure of filelog.size for data starting ' - 'with \\1\\n') + error( + 'FIXME: This is a known failure of filelog.size for data starting ' + 'with \\1\\n' + ) node = addrev(textwith, renamed=True) if not textwith == fl.read(node):