MCPcopy Create free account
hub / github.com/psf/black / C

Class C

tests/data/simple_cases/composition.py:1–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1class C:
2 def test(self) -> None:
3 with patch("black.out", print):
4 self.assertEqual(
5 unstyle(str(report)), "1 file reformatted, 1 file failed to reformat."
6 )
7 self.assertEqual(
8 unstyle(str(report)),
9 "1 file reformatted, 1 file left unchanged, 1 file failed to reformat.",
10 )
11 self.assertEqual(
12 unstyle(str(report)),
13 "2 files reformatted, 1 file left unchanged, 1 file failed to"
14 " reformat.",
15 )
16 self.assertEqual(
17 unstyle(str(report)),
18 "2 files reformatted, 2 files left unchanged, 2 files failed to"
19 " reformat.",
20 )
21 for i in (a,):
22 if (
23 # Rule 1
24 i % 2 == 0
25 # Rule 2
26 and i % 3 == 0
27 ):
28 while (
29 # Just a comment
30 call()
31 # Another
32 ):
33 print(i)
34 xxxxxxxxxxxxxxxx = Yyyy2YyyyyYyyyyy(
35 push_manager=context.request.resource_manager,
36 max_items_to_push=num_items,
37 batch_size=Yyyy2YyyyYyyyyYyyy.FULL_SIZE,
38 ).push(
39 # Only send the first n items.
40 items=items[:num_items]
41 )
42 return (
43 'Utterly failed doctest test for %s\n File "%s", line %s, in %s\n\n%s'
44 % (test.name, test.filename, lineno, lname, err)
45 )
46
47 def omitting_trailers(self) -> None:
48 get_collection(
49 hey_this_is_a_very_long_call, it_has_funny_attributes, really=True
50 )[OneLevelIndex]
51 get_collection(
52 hey_this_is_a_very_long_call, it_has_funny_attributes, really=True
53 )[OneLevelIndex][TwoLevelIndex][ThreeLevelIndex][FourLevelIndex]
54 d[0][1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][
55 22
56 ]
57 assignment = (
58 some.rather.elaborate.rule() and another.rule.ending_with.index[123]
59 )
60

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected