Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #2651. Fixes #2754. Fixes #2518. Fixes #2321. This adds a test that lists a number of cases of unstable formatting that we have seen in the issue tracker. Checking it in will ensure that we don't regress on these cases.
- Loading branch information
1 parent
3437950
commit 4ce049d
Showing
2 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
importA;() << 0 ** 101234234242352525425252352352525234890264906820496920680926538059059209922523523525 # | ||
|
||
assert sort_by_dependency( | ||
{ | ||
"1": {"2", "3"}, "2": {"2a", "2b"}, "3": {"3a", "3b"}, | ||
"2a": set(), "2b": set(), "3a": set(), "3b": set() | ||
} | ||
) == ["2a", "2b", "2", "3a", "3b", "3", "1"] | ||
|
||
importA | ||
0;0^0# | ||
|
||
class A: | ||
def foo(self): | ||
for _ in range(10): | ||
aaaaaaaaaaaaaaaaaaa = bbbbbbbbbbbbbbb.cccccccccc( # pylint: disable=no-member | ||
xxxxxxxxxxxx | ||
) | ||
|
||
def test(self, othr): | ||
return (1 == 2 and | ||
(name, description, self.default, self.selected, self.auto_generated, self.parameters, self.meta_data, self.schedule) == | ||
(name, description, othr.default, othr.selected, othr.auto_generated, othr.parameters, othr.meta_data, othr.schedule)) | ||
|
||
# output | ||
|
||
importA | ||
( | ||
() | ||
<< 0 | ||
** 101234234242352525425252352352525234890264906820496920680926538059059209922523523525 | ||
) # | ||
|
||
assert ( | ||
sort_by_dependency( | ||
{ | ||
"1": {"2", "3"}, | ||
"2": {"2a", "2b"}, | ||
"3": {"3a", "3b"}, | ||
"2a": set(), | ||
"2b": set(), | ||
"3a": set(), | ||
"3b": set(), | ||
} | ||
) | ||
== ["2a", "2b", "2", "3a", "3b", "3", "1"] | ||
) | ||
|
||
importA | ||
0 | ||
0 ^ 0 # | ||
|
||
|
||
class A: | ||
def foo(self): | ||
for _ in range(10): | ||
aaaaaaaaaaaaaaaaaaa = bbbbbbbbbbbbbbb.cccccccccc( | ||
xxxxxxxxxxxx | ||
) # pylint: disable=no-member | ||
|
||
|
||
def test(self, othr): | ||
return 1 == 2 and ( | ||
name, | ||
description, | ||
self.default, | ||
self.selected, | ||
self.auto_generated, | ||
self.parameters, | ||
self.meta_data, | ||
self.schedule, | ||
) == ( | ||
name, | ||
description, | ||
othr.default, | ||
othr.selected, | ||
othr.auto_generated, | ||
othr.parameters, | ||
othr.meta_data, | ||
othr.schedule, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters