MCPcopy Index your code
hub / github.com/python/cpython / test_encode_explicit_none_args

Method test_encode_explicit_none_args

Lib/test/test_userstring.py:143–148  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

141 self.checkraises(UnicodeError, '\ud800', 'encode')
142
143 def test_encode_explicit_none_args(self):
144 self.checkequal(b'hello', 'hello', 'encode', None, None)
145 # Check that encoding defaults to utf-8
146 self.checkequal(b'\xf0\xa3\x91\x96', '\U00023456', 'encode', None, None)
147 # Check that errors defaults to 'strict'
148 self.checkraises(UnicodeError, '\ud800', 'encode', None, None)
149
150 def test_implementation(self):
151 s = UserString('ababahalamaha')

Callers

nothing calls this directly

Calls 2

checkequalMethod · 0.95
checkraisesMethod · 0.95

Tested by

no test coverage detected