Skip to content

Cannot handle message that contains repeated fields #7

@goyaogo

Description

@goyaogo

Getting a trace dump from trying to call permute() for a class that contains a repeated field:

Traceback (most recent call last):
  File "test_protofuzz.py", line 27, in <module>
    gen_message_from_class(Test)
  File "test_protofuzz.py", line 22, in gen_message_from_class
    for obj in generator.permute():
  File "/Users/goyaogo/venvs/test_msg/lib/python3.6/site-packages/protofuzz-0.1-py3.6.egg/protofuzz/protofuzz.py", line 183, in _iteration_helper
    yield _fields_to_object(self._descriptor, fields)
  File "/Users/goyaogo/venvs/test_msg/lib/python3.6/site-packages/protofuzz-0.1-py3.6.egg/protofuzz/protofuzz.py", line 149, in _fields_to_object
    value = _fields_to_object(subtype, value)
  File "/Users/goyaogo/venvs/test_msg/lib/python3.6/site-packages/protofuzz-0.1-py3.6.egg/protofuzz/protofuzz.py", line 150, in _fields_to_object
    _assign_to_field(obj, name, value)
  File "/Users/goyaogo/venvs/test_msg/lib/python3.6/site-packages/protofuzz-0.1-py3.6.egg/protofuzz/protofuzz.py", line 138, in _assign_to_field
    raise RuntimeError("Unsupported type: {}".format(type(target)))
RuntimeError: Unsupported type: <class 'google.protobuf.pyext._message.RepeatedScalarContainer'>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions