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

Function test_stringize_deep_nested

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

Source from the content-addressed store, hash-verified

147
148
149def test_stringize_deep_nested():
150 assert strings.stringize_deep(
151 {
152 'key 1': 'value 1',
153 u'ключ 2': {
154 'subkey 1': 'value 1',
155 u'подключ 2': u'value 2',
156 },
157 }
158 ) == {
159 'key 1' if six.PY2 else b'key 1': 'value 1' if six.PY2 else b'value 1',
160 u'ключ 2'.encode('utf-8'): {
161 ('subkey 1' if six.PY2 else b'subkey 1'): 'value 1' if six.PY2 else b'value 1',
162 u'подключ 2'.encode('utf-8'): u'value 2'.encode('utf-8'),
163 },
164 }
165
166
167def test_stringize_deep_plain():

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected