(self)
| 265 | assert s.pretty() == unicode_box_pretty_result |
| 266 | |
| 267 | def test_no_bytes(self): |
| 268 | s = screen.screen(2, 2, encoding=None) |
| 269 | s.put_abs(1, 1, u'A') |
| 270 | s.put_abs(2, 2, u'D') |
| 271 | |
| 272 | with self.assertRaises(TypeError): |
| 273 | s.put_abs(1, 2, b'B') |
| 274 | |
| 275 | if PY3: |
| 276 | assert str(s) == u'A \n D' |
| 277 | else: |
| 278 | assert unicode(s) == u'A \n D' |
| 279 | # This will still work if it's limited to ascii |
| 280 | assert str(s) == b'A \n D' |
| 281 | |
| 282 | if __name__ == '__main__': |
| 283 | unittest.main() |
nothing calls this directly
no test coverage detected