Add expected failure tests with the unstable formattings
This commit is contained in:
parent
30a332c32f
commit
ceeb1d9a2e
3
tests/data/trailing_comma_optional_parens1.py
Normal file
3
tests/data/trailing_comma_optional_parens1.py
Normal file
@ -0,0 +1,3 @@
|
||||
if e1234123412341234.winerror not in (_winapi.ERROR_SEM_TIMEOUT,
|
||||
_winapi.ERROR_PIPE_BUSY) or _check_timeout(t):
|
||||
pass
|
3
tests/data/trailing_comma_optional_parens2.py
Normal file
3
tests/data/trailing_comma_optional_parens2.py
Normal file
@ -0,0 +1,3 @@
|
||||
if (e123456.get_tk_patchlevel() >= (8, 6, 0, 'final') or
|
||||
(8, 5, 8) <= get_tk_patchlevel() < (8, 6)):
|
||||
pass
|
8
tests/data/trailing_comma_optional_parens3.py
Normal file
8
tests/data/trailing_comma_optional_parens3.py
Normal file
@ -0,0 +1,8 @@
|
||||
if True:
|
||||
if True:
|
||||
if True:
|
||||
return _(
|
||||
"qweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweas "
|
||||
+ "qweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqwegqweasdzxcqweasdzxc.",
|
||||
"qweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqwe",
|
||||
) % {"reported_username": reported_username, "report_reason": report_reason}
|
@ -368,6 +368,27 @@ def test_function_trailing_comma(self) -> None:
|
||||
black.assert_equivalent(source, actual)
|
||||
black.assert_stable(source, actual, DEFAULT_MODE)
|
||||
|
||||
@unittest.expectedFailure
|
||||
@patch("black.dump_to_file", dump_to_stderr)
|
||||
def test_trailing_comma_optional_parens_stability1(self) -> None:
|
||||
source, _expected = read_data("trailing_comma_optional_parens1")
|
||||
actual = fs(source)
|
||||
black.assert_stable(source, actual, DEFAULT_MODE)
|
||||
|
||||
@unittest.expectedFailure
|
||||
@patch("black.dump_to_file", dump_to_stderr)
|
||||
def test_trailing_comma_optional_parens_stability2(self) -> None:
|
||||
source, _expected = read_data("trailing_comma_optional_parens2")
|
||||
actual = fs(source)
|
||||
black.assert_stable(source, actual, DEFAULT_MODE)
|
||||
|
||||
@unittest.expectedFailure
|
||||
@patch("black.dump_to_file", dump_to_stderr)
|
||||
def test_trailing_comma_optional_parens_stability3(self) -> None:
|
||||
source, _expected = read_data("trailing_comma_optional_parens3")
|
||||
actual = fs(source)
|
||||
black.assert_stable(source, actual, DEFAULT_MODE)
|
||||
|
||||
@patch("black.dump_to_file", dump_to_stderr)
|
||||
def test_expression(self) -> None:
|
||||
source, expected = read_data("expression")
|
||||
|
Loading…
Reference in New Issue
Block a user