Skip to content

Commit ac4a8a5

Browse files
committed
blacklit paradise
1 parent a379bdc commit ac4a8a5

File tree

1 file changed

+63
-62
lines changed

1 file changed

+63
-62
lines changed

Lib/test/test_pyrepl/test_pyrepl.py

+63-62
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ def prepare_reader(self, events):
2828
def test_up_arrow_simple(self):
2929
# fmt: off
3030
code = (
31-
'def f():\n'
32-
' ...\n'
31+
"def f():\n"
32+
" ...\n"
3333
)
3434
# fmt: on
3535
events = itertools.chain(
@@ -46,8 +46,8 @@ def test_up_arrow_simple(self):
4646
def test_down_arrow_end_of_input(self):
4747
# fmt: off
4848
code = (
49-
'def f():\n'
50-
' ...\n'
49+
"def f():\n"
50+
" ...\n"
5151
)
5252
# fmt: on
5353
events = itertools.chain(
@@ -315,14 +315,14 @@ def test_cursor_position_after_wrap_and_move_up(self):
315315
def test_auto_indent_default(self):
316316
# fmt: off
317317
input_code = (
318-
'def f():\n'
319-
'pass\n\n'
318+
"def f():\n"
319+
"pass\n\n"
320320
)
321321

322322
output_code = (
323-
'def f():\n'
324-
' pass\n'
325-
' '
323+
"def f():\n"
324+
" pass\n"
325+
" "
326326
)
327327
# fmt: on
328328

@@ -342,10 +342,10 @@ def test_auto_indent_continuation(self):
342342
)
343343

344344
output_code = (
345-
'def f():\n'
346-
' pass\n'
347-
' pass\n'
348-
' '
345+
"def f():\n"
346+
" pass\n"
347+
" pass\n"
348+
" "
349349
)
350350
# fmt: on
351351

@@ -367,16 +367,16 @@ def test_auto_indent_prev_block(self):
367367
"pass\n\n"
368368
),
369369
code_to_events(
370-
'def g():\n'
371-
'pass\n\n'
370+
"def g():\n"
371+
"pass\n\n"
372372
),
373373
)
374374

375375

376376
output_code = (
377-
'def g():\n'
378-
' pass\n'
379-
' '
377+
"def g():\n"
378+
" pass\n"
379+
" "
380380
)
381381
# fmt: on
382382

@@ -568,6 +568,7 @@ class Dummy:
568568
@property
569569
def test_func(self):
570570
import warnings
571+
571572
warnings.warn("warnings\n")
572573
return None
573574

@@ -591,12 +592,12 @@ def prepare_reader(self, events):
591592
def test_paste(self):
592593
# fmt: off
593594
code = (
594-
'def a():\n'
595-
' for x in range(10):\n'
596-
' if x%2:\n'
597-
' print(x)\n'
598-
' else:\n'
599-
' pass\n'
595+
"def a():\n"
596+
" for x in range(10):\n"
597+
" if x%2:\n"
598+
" print(x)\n"
599+
" else:\n"
600+
" pass\n"
600601
)
601602
# fmt: on
602603

@@ -617,10 +618,10 @@ def test_paste(self):
617618
def test_paste_mid_newlines(self):
618619
# fmt: off
619620
code = (
620-
'def f():\n'
621-
' x = y\n'
622-
' \n'
623-
' y = z\n'
621+
"def f():\n"
622+
" x = y\n"
623+
" \n"
624+
" y = z\n"
624625
)
625626
# fmt: on
626627

@@ -641,16 +642,16 @@ def test_paste_mid_newlines(self):
641642
def test_paste_mid_newlines_not_in_paste_mode(self):
642643
# fmt: off
643644
code = (
644-
'def f():\n'
645-
'x = y\n'
646-
'\n'
647-
'y = z\n\n'
645+
"def f():\n"
646+
"x = y\n"
647+
"\n"
648+
"y = z\n\n"
648649
)
649650

650651
expected = (
651-
'def f():\n'
652-
' x = y\n'
653-
' '
652+
"def f():\n"
653+
" x = y\n"
654+
" "
654655
)
655656
# fmt: on
656657

@@ -662,20 +663,20 @@ def test_paste_mid_newlines_not_in_paste_mode(self):
662663
def test_paste_not_in_paste_mode(self):
663664
# fmt: off
664665
input_code = (
665-
'def a():\n'
666-
'for x in range(10):\n'
667-
'if x%2:\n'
668-
'print(x)\n'
669-
'else:\n'
670-
'pass\n\n'
666+
"def a():\n"
667+
"for x in range(10):\n"
668+
"if x%2:\n"
669+
"print(x)\n"
670+
"else:\n"
671+
"pass\n\n"
671672
)
672673

673674
output_code = (
674-
'def a():\n'
675-
' for x in range(10):\n'
676-
' if x%2:\n'
677-
' print(x)\n'
678-
' else:'
675+
"def a():\n"
676+
" for x in range(10):\n"
677+
" if x%2:\n"
678+
" print(x)\n"
679+
" else:"
679680
)
680681
# fmt: on
681682

@@ -688,25 +689,25 @@ def test_bracketed_paste(self):
688689
"""Test that bracketed paste using \x1b[200~ and \x1b[201~ works."""
689690
# fmt: off
690691
input_code = (
691-
'def a():\n'
692-
' for x in range(10):\n'
693-
'\n'
694-
' if x%2:\n'
695-
' print(x)\n'
696-
'\n'
697-
' else:\n'
698-
' pass\n'
692+
"def a():\n"
693+
" for x in range(10):\n"
694+
"\n"
695+
" if x%2:\n"
696+
" print(x)\n"
697+
"\n"
698+
" else:\n"
699+
" pass\n"
699700
)
700701

701702
output_code = (
702-
'def a():\n'
703-
' for x in range(10):\n'
704-
'\n'
705-
' if x%2:\n'
706-
' print(x)\n'
707-
'\n'
708-
' else:\n'
709-
' pass\n'
703+
"def a():\n"
704+
" for x in range(10):\n"
705+
"\n"
706+
" if x%2:\n"
707+
" print(x)\n"
708+
"\n"
709+
" else:\n"
710+
" pass\n"
710711
)
711712
# fmt: on
712713

0 commit comments

Comments
 (0)