Skip to content

Commit

Permalink
Merge pull request #11 from isidentical/preserve-formatting-on-long-s…
Browse files Browse the repository at this point in the history
…tring

Preserve formatting on indented literals
  • Loading branch information
isidentical authored Jan 15, 2022
2 parents 0e0c408 + 17c95a5 commit 8824592
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
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
)

0 comments on commit 8824592

Please # to comment.