Mercurial > public > mercurial-scm > hg
diff tests/test-linerange.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 | 6939b6ac960a |
children | ee3a55c8fd0f |
line wrap: on
line diff
--- a/tests/test-linerange.py Sat Oct 05 10:29:34 2019 -0400 +++ b/tests/test-linerange.py Sun Oct 06 09:45:02 2019 -0400 @@ -17,7 +17,9 @@ 09 at OLD 10 at OLD 11 at OLD -'''[1:] # strip initial LF +'''[ + 1: +] # strip initial LF text2 = b''' 00 at NEW @@ -32,7 +34,10 @@ 09 at NEW 10 at NEW 11 at NEW -'''[1:] # strip initial LF +'''[ + 1: +] # strip initial LF + def filteredblocks(blocks, rangeb): """return `rangea` extracted from `blocks` coming from @@ -42,8 +47,8 @@ skipped = [b not in filtered for b in blocks] return rangea, skipped + class blocksinrangetests(unittest.TestCase): - def setUp(self): self.blocks = list(mdiff.allblocks(text1, text2)) assert self.blocks == [ @@ -227,6 +232,8 @@ else: self.fail('%s not raised' % exctype.__name__) + if __name__ == '__main__': import silenttestrunner + silenttestrunner.main(__name__)