move more tests to non-preview
This commit is contained in:
parent
387f3fbaaa
commit
c9280bf916
12
tests/data/preview/return_annotation_brackets_string.py
Normal file
12
tests/data/preview/return_annotation_brackets_string.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Long string example
|
||||||
|
def frobnicate() -> "ThisIsTrulyUnreasonablyExtremelyLongClassName | list[ThisIsTrulyUnreasonablyExtremelyLongClassName]":
|
||||||
|
pass
|
||||||
|
|
||||||
|
# output
|
||||||
|
|
||||||
|
# Long string example
|
||||||
|
def frobnicate() -> (
|
||||||
|
"ThisIsTrulyUnreasonablyExtremelyLongClassName |"
|
||||||
|
" list[ThisIsTrulyUnreasonablyExtremelyLongClassName]"
|
||||||
|
):
|
||||||
|
pass
|
@ -87,10 +87,6 @@ def foo() -> tuple[loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
|
|||||||
def foo() -> tuple[int, int, int,]:
|
def foo() -> tuple[int, int, int,]:
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
# Long string example
|
|
||||||
def frobnicate() -> "ThisIsTrulyUnreasonablyExtremelyLongClassName | list[ThisIsTrulyUnreasonablyExtremelyLongClassName]":
|
|
||||||
pass
|
|
||||||
|
|
||||||
# output
|
# output
|
||||||
# Control
|
# Control
|
||||||
def double(a: int) -> int:
|
def double(a: int) -> int:
|
||||||
@ -212,11 +208,3 @@ def foo() -> (
|
|||||||
]
|
]
|
||||||
):
|
):
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
|
|
||||||
# Long string example
|
|
||||||
def frobnicate() -> (
|
|
||||||
"ThisIsTrulyUnreasonablyExtremelyLongClassName |"
|
|
||||||
" list[ThisIsTrulyUnreasonablyExtremelyLongClassName]"
|
|
||||||
):
|
|
||||||
pass
|
|
@ -31,17 +31,15 @@ def check_file(
|
|||||||
@pytest.mark.filterwarnings("ignore:invalid escape sequence.*:DeprecationWarning")
|
@pytest.mark.filterwarnings("ignore:invalid escape sequence.*:DeprecationWarning")
|
||||||
@pytest.mark.parametrize("filename", all_data_cases("simple_cases"))
|
@pytest.mark.parametrize("filename", all_data_cases("simple_cases"))
|
||||||
def test_simple_format(filename: str) -> None:
|
def test_simple_format(filename: str) -> None:
|
||||||
check_file("simple_cases", filename, DEFAULT_MODE)
|
magic_trailing_comma = filename != "skip_magic_trailing_comma"
|
||||||
|
check_file(
|
||||||
|
"simple_cases", filename, black.Mode(magic_trailing_comma=magic_trailing_comma)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("filename", all_data_cases("preview"))
|
@pytest.mark.parametrize("filename", all_data_cases("preview"))
|
||||||
def test_preview_format(filename: str) -> None:
|
def test_preview_format(filename: str) -> None:
|
||||||
magic_trailing_comma = filename != "skip_magic_trailing_comma"
|
check_file("preview", filename, black.Mode(preview=True))
|
||||||
check_file(
|
|
||||||
"preview",
|
|
||||||
filename,
|
|
||||||
black.Mode(preview=True, magic_trailing_comma=magic_trailing_comma),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("filename", all_data_cases("preview_39"))
|
@pytest.mark.parametrize("filename", all_data_cases("preview_39"))
|
||||||
|
Loading…
Reference in New Issue
Block a user