]>
git.madduck.net Git - etc/vim.git/blobdiff - tests/test_black.py
madduck's git repository
Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@ git. madduck. net .
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
SSH access, as well as push access can be individually
arranged .
If you use my repositories frequently, consider adding the following
snippet to ~/.gitconfig and using the third clone URL listed for each
project:
[url "git://git.madduck.net/madduck/"]
insteadOf = madduck:
self.assertEqual(
unstyle(str(report)), '1 file reformatted, 1 file left unchanged.'
)
self.assertEqual(
unstyle(str(report)), '1 file reformatted, 1 file left unchanged.'
)
+ self.assertEqual(report.return_code, 0)
+ report.check = True
self.assertEqual(report.return_code, 1)
self.assertEqual(report.return_code, 1)
report.failed(Path('e1'), 'boom')
self.assertEqual(len(out_lines), 2)
self.assertEqual(len(err_lines), 1)
report.failed(Path('e1'), 'boom')
self.assertEqual(len(out_lines), 2)
self.assertEqual(len(err_lines), 1)
'2 files failed to reformat.',
)
self.assertEqual(report.return_code, 123)
'2 files failed to reformat.',
)
self.assertEqual(report.return_code, 123)
+ report.check = True
+ self.assertEqual(
+ unstyle(str(report)),
+ '2 files would be reformatted, 2 files would be left unchanged, '
+ '2 files would fail to reformat.',
+ )
def test_is_python36(self) -> None:
node = black.lib2to3_parse("def f(*, arg): ...\n")
def test_is_python36(self) -> None:
node = black.lib2to3_parse("def f(*, arg): ...\n")