8000 bpo-36390: IDLE: Combine region formatting methods. by csabella · Pull Request #12481 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-36390: IDLE: Combine region formatting methods. #12481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 17, 2019
Prev Previous commit
Next Next commit
Edit expected lines.
  • Loading branch information
terryjreedy committed Jul 17, 2019
commit f97af53876c75291e55e5a3676315dc93a6efcd1
10 changes: 5 additions & 5 deletions Lib/idlelib/idle_test/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,18 +432,18 @@ def compare(self):
return None
"""



def test_get_region(self):
get = self.formatter.get_region
text = self.text
eq = self.assertEqual

# Add selection.
text.tag_add('sel', '7.0', '10.0')
eq(get(), ('7.0', '10.0',
'\n def compare(self):\n if a > b:\n',
['', ' def compare(self):', ' if a > b:', '']))
expected_lines = ['',
' def compare(self):',
' if a > b:',
'']
eq(get(), ('7.0', '10.0', '\n'.join(expected_lines), expected_lines))

# Remove selection.
text.tag_remove('sel', '1.0', 'end')
Expand Down
0