@@ -28,8 +28,8 @@ def prepare_reader(self, events):
28
28
def test_up_arrow_simple (self ):
29
29
# fmt: off
30
30
code = (
31
- ' def f():\n '
32
- ' ...\n '
31
+ " def f():\n "
32
+ " ...\n "
33
33
)
34
34
# fmt: on
35
35
events = itertools .chain (
@@ -46,8 +46,8 @@ def test_up_arrow_simple(self):
46
46
def test_down_arrow_end_of_input (self ):
47
47
# fmt: off
48
48
code = (
49
- ' def f():\n '
50
- ' ...\n '
49
+ " def f():\n "
50
+ " ...\n "
51
51
)
52
52
# fmt: on
53
53
events = itertools .chain (
@@ -315,14 +315,14 @@ def test_cursor_position_after_wrap_and_move_up(self):
315
315
def test_auto_indent_default (self ):
316
316
# fmt: off
317
317
input_code = (
318
- ' def f():\n '
319
- ' pass\n \n '
318
+ " def f():\n "
319
+ " pass\n \n "
320
320
)
321
321
322
322
output_code = (
323
- ' def f():\n '
324
- ' pass\n '
325
- ' '
323
+ " def f():\n "
324
+ " pass\n "
325
+ " "
326
326
)
327
327
# fmt: on
328
328
@@ -342,10 +342,10 @@ def test_auto_indent_continuation(self):
342
342
)
343
343
344
344
output_code = (
345
- ' def f():\n '
346
- ' pass\n '
347
- ' pass\n '
348
- ' '
345
+ " def f():\n "
346
+ " pass\n "
347
+ " pass\n "
348
+ " "
349
349
)
350
350
# fmt: on
351
351
@@ -367,16 +367,16 @@ def test_auto_indent_prev_block(self):
367
367
"pass\n \n "
368
368
),
369
369
code_to_events (
370
- ' def g():\n '
371
- ' pass\n \n '
370
+ " def g():\n "
371
+ " pass\n \n "
372
372
),
373
373
)
374
374
375
375
376
376
output_code = (
377
- ' def g():\n '
378
- ' pass\n '
379
- ' '
377
+ " def g():\n "
378
+ " pass\n "
379
+ " "
380
380
)
381
381
# fmt: on
382
382
@@ -568,6 +568,7 @@ class Dummy:
568
568
@property
569
569
def test_func (self ):
570
570
import warnings
571
+
571
572
warnings .warn ("warnings\n " )
572
573
return None
573
574
@@ -591,12 +592,12 @@ def prepare_reader(self, events):
591
592
def test_paste (self ):
592
593
# fmt: off
593
594
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 "
600
601
)
601
602
# fmt: on
602
603
@@ -617,10 +618,10 @@ def test_paste(self):
617
618
def test_paste_mid_newlines (self ):
618
619
# fmt: off
619
620
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 "
624
625
)
625
626
# fmt: on
626
627
@@ -641,16 +642,16 @@ def test_paste_mid_newlines(self):
641
642
def test_paste_mid_newlines_not_in_paste_mode (self ):
642
643
# fmt: off
643
644
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 "
648
649
)
649
650
650
651
expected = (
651
- ' def f():\n '
652
- ' x = y\n '
653
- ' '
652
+ " def f():\n "
653
+ " x = y\n "
654
+ " "
654
655
)
655
656
# fmt: on
656
657
@@ -662,20 +663,20 @@ def test_paste_mid_newlines_not_in_paste_mode(self):
662
663
def test_paste_not_in_paste_mode (self ):
663
664
# fmt: off
664
665
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 "
671
672
)
672
673
673
674
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:"
679
680
)
680
681
# fmt: on
681
682
@@ -688,25 +689,25 @@ def test_bracketed_paste(self):
688
689
"""Test that bracketed paste using \x1b [200~ and \x1b [201~ works."""
689
690
# fmt: off
690
691
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 "
699
700
)
700
701
701
702
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 "
710
711
)
711
712
# fmt: on
712
713
0 commit comments