at 23.11-beta 2.7 kB view raw
1diff --git a/tests/test_cst.py b/tests/test_cst.py 2index 8532240..bdba2d7 100644 3--- a/tests/test_cst.py 4+++ b/tests/test_cst.py 5@@ -3,7 +3,6 @@ import ast 6 from inspect import isabstract 7 from operator import attrgetter 8 9-import black 10 import libcst 11 import parso 12 import pytest 13@@ -51,27 +50,6 @@ def test_ast_unparse_from_nodes(source_code): 14 assert ast.dump(first) == ast.dump(second) 15 16 17-@pytest.mark.xfail 18-@example("A\u2592", black.Mode()) 19-@given( 20- source_code=hypothesmith.from_node(), 21- mode=st.builds( 22- black.Mode, 23- line_length=st.just(88) | st.integers(0, 200), 24- string_normalization=st.booleans(), 25- is_pyi=st.booleans(), 26- ), 27-) 28-def test_black_autoformatter_from_nodes(source_code, mode): 29- try: 30- result = black.format_file_contents(source_code, fast=False, mode=mode) 31- except black.NothingChanged: 32- pass 33- else: 34- with pytest.raises(black.NothingChanged): 35- black.format_file_contents(result, fast=False, mode=mode) 36- 37- 38 @given(source_code=hypothesmith.from_node()) 39 def test_from_node_always_compilable(source_code): 40 compile(source_code, "<string>", "exec") 41diff --git a/tests/test_syntactic.py b/tests/test_syntactic.py 42index 7fe9835..17c4f7c 100644 43--- a/tests/test_syntactic.py 44+++ b/tests/test_syntactic.py 45@@ -3,7 +3,6 @@ import ast 46 import io 47 import tokenize 48 49-import black 50 import blib2to3 51 import parso 52 import pytest 53@@ -58,34 +57,6 @@ def test_ast_unparse_from_grammar(source_code): 54 assert ast.dump(first) == ast.dump(second) 55 56 57-@example("\\", black.Mode()) 58-@example("A#\r#", black.Mode()) 59-@given( 60- source_code=hypothesmith.from_grammar(), 61- mode=st.builds( 62- black.Mode, 63- line_length=st.just(88) | st.integers(0, 200), 64- string_normalization=st.booleans(), 65- is_pyi=st.booleans(), 66- ), 67-) 68-def test_black_autoformatter_from_grammar(source_code, mode): 69- try: 70- result = black.format_file_contents(source_code, fast=False, mode=mode) 71- except black.NothingChanged: 72- pass 73- except blib2to3.pgen2.tokenize.TokenError: 74- # Fails to tokenise e.g. "\\", though compile("\\", "<string>", "exec") works. 75- # See https://github.com/psf/black/issues/1012 76- reject() 77- except black.InvalidInput: 78- # e.g. "A#\r#", see https://github.com/psf/black/issues/970 79- reject() 80- else: 81- with pytest.raises(black.NothingChanged): 82- black.format_file_contents(result, fast=False, mode=mode) 83- 84- 85 @given(source_code=hypothesmith.from_grammar("eval_input")) 86 def test_eval_input_generation(source_code): 87 compile(source_code, filename="<string>", mode="eval")