-
Notifications
You must be signed in to change notification settings - Fork 4
Description
$ py.test --doctest-modules dict_to_protobuf.py
=============================== test session starts ===============================
platform darwin -- Python 2.7.5 -- py-1.4.26 -- pytest-2.6.4
collected 3 items
dict_to_protobuf.py .F.
================================== FAILURES =================================
_____________________ [doctest] dict_to_protobuf.dict_to_protobuf _________________________
029 Converts a dict to a protobuf message
030
031 >>> import example_pb2
032 >>> ex = dict_to_protobuf(
033 ... example_pb2,
034 ... example_pb2.Example(),
035 ... {'key': '1', 'values': ['1','2','3'], 'nested': {'value': '1'},
036 ... 'nested_values': [{'value': '1'}, {'value': '2'}]}
037 ... )
038 >>> ex.key
Expected:
'1'
Got:
u'1'
dict_to_protobuf.py:38: DocTestFailure
========================= 1 failed, 2 passed in 0.39 seconds ========================