-
Notifications
You must be signed in to change notification settings - Fork 324
Fix TextCanvas CanvasError("Attribute extends beyond text...")
#555
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
Conversation
* `[[]] * ...` causes list of 1 list with pointers amount equal to multiplier instead of "list of lists" * Add 2 basic font tests which check for Canvas create issue * Add few type annotations during debug process Fix: urwid#554
Tests order change should not cause tests failures
| maxcol = 0 | ||
|
|
||
| if attr is None: | ||
| attr = [[]] * len(text) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue source
| keys = None | ||
| while keys!=['q']: | ||
| r.text=([t.ljust(cols) for t in text]+[""]*rows)[:rows] | ||
| r.attr=(attr+[[]]*rows) [:rows] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
place for the same issue
| expected = ' ┐ \n │ \n ┴ ' | ||
| self.assertEqual(expected, rendered) | ||
|
|
||
| def test_002_non_rect(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test should crash without fix for issue
| class CalcBreaksDBCharTest(CalcBreaksTest, unittest.TestCase): | ||
| def setUp(self): | ||
| self.old_encoding = urwid.util._target_encoding | ||
| urwid.set_encoding("euc-jp") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this encoding leaked to the other tests without cleanup stage
[[]] * ...causes list of 1 list with pointers amount equal to multiplier instead of "list of lists"Fix: #554
Checklist
masterorpython-dual-supportbranchtoxsuccessfully in local environment