MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_encode_default_args

Method test_encode_default_args

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

Source from the content-addressed store, hash-verified

53 self.assertEqual(fmt2 % str3, 'value is TEST')
54
55 def test_encode_default_args(self):
56 self.checkequal(b'hello', 'hello', 'encode')
57 # Check that encoding defaults to utf-8
58 self.checkequal(b'\xf0\xa3\x91\x96', '\U00023456', 'encode')
59 # Check that errors defaults to 'strict'
60 self.checkraises(UnicodeError, '\ud800', 'encode')
61
62 def test_encode_explicit_none_args(self):
63 self.checkequal(b'hello', 'hello', 'encode', None, None)

Callers

nothing calls this directly

Calls 2

checkequalMethod · 0.95
checkraisesMethod · 0.95

Tested by

no test coverage detected