MCPcopy Create free account
hub / github.com/pexpect/pexpect / test_no_bytes

Method test_no_bytes

tests/test_screen.py:267–280  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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
282if __name__ == '__main__':
283 unittest.main()

Callers

nothing calls this directly

Calls 2

put_absMethod · 0.80
assertRaisesMethod · 0.80

Tested by

no test coverage detected