Skip to content
New issue

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

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

Already on GitHub? # to your account

Preserve formatting on indented literals #11

Merged
merged 1 commit into from
Jan 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ classifiers =
[options]
py_modules = teyit
install_requires =
refactor==0.4.0
refactor==0.4.1
python_requires = >=3.9

[options.entry_points]
Expand Down
14 changes: 14 additions & 0 deletions tests/cosmetic/literals/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,17 @@ def test_random(self):
2 + 2,
False
)

def test_indented_long_string(self):
self.assertTrue(
"Rejected:\n"
"Launchpad failed to process the upload path '~name16/ubuntu':\n\n"
"unicode PPA name: áří is disabled.\n\n"
"It is likely that you have a configuration problem with "
"dput/dupload.\n"
"Please check the documentation at "
"https://help.launchpad.net/Packaging/PPA/Uploading and update "
"your configuration.\n\n"
"Further error processing not possible because of a critical "
"previous error." in body
)
15 changes: 15 additions & 0 deletions tests/cosmetic/literals/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,18 @@ def test_random(self):
self.assertFalse(
2 + 2
)

def test_indented_long_string(self):
self.assertIn(
"Rejected:\n"
"Launchpad failed to process the upload path '~name16/ubuntu':\n\n"
"unicode PPA name: áří is disabled.\n\n"
"It is likely that you have a configuration problem with "
"dput/dupload.\n"
"Please check the documentation at "
"https://help.launchpad.net/Packaging/PPA/Uploading and update "
"your configuration.\n\n"
"Further error processing not possible because of a critical "
"previous error.",
body
)