Skip to content

Conversation

@penguinolog
Copy link
Collaborator

  • [[]] * ... 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
  • Force tests to restore default encoding in tearDown

Fix: #554

Checklist
  • I've ensured that similar functionality has not already been implemented
  • I've ensured that similar functionality has not earlier been proposed and declined
  • I've branched off the master or python-dual-support branch
  • I've merged fresh upstream into my branch recently
  • I've ran tox successfully in local environment

* `[[]] * ...` 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)
Copy link
Collaborator Author

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]
Copy link
Collaborator Author

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):
Copy link
Collaborator Author

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")
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when using BigText: urwid.canvas.CanvasError: Attribute extends beyond text

1 participant