MCPcopy Create free account
hub / github.com/catboost/catboost / test_stringize_deep

Function test_stringize_deep

library/python/strings/ut/test_strings.py:119–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

117
118
119def test_stringize_deep():
120 assert strings.stringize_deep(
121 {
122 'key 1': 'value 1',
123 u'ключ 2': u'значение 2',
124 'list': [u'ключ 2', 'key 1', (u'к', 2)],
125 }
126 ) == {
127 'key 1' if six.PY2 else b'key 1': 'value 1' if six.PY2 else b'value 1',
128 u'ключ 2'.encode('utf-8'): u'значение 2'.encode('utf-8'),
129 ('list' if six.PY2 else b'list'): [
130 u'ключ 2'.encode('utf-8'),
131 'key 1' if six.PY2 else b'key 1',
132 (u'к'.encode('utf-8'), 2),
133 ],
134 }
135
136
137def test_stringize_deep_doesnt_transcode():

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected