pytorch
582e852f - [caffe2] Add unittests for schema.Field init (#47512)

Commit
4 years ago
[caffe2] Add unittests for schema.Field init (#47512) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/47512 I deleted the last line of `__init__` -- `self._field_offsets.append(offset)` -- and the unittests didn't fail. So this diff is to improve test coverage. Test Plan: ``` ✓ Pass: caffe2/caffe2/python:schema_test - testInitShouldSetEmptyParent (caffe2.caffe2.python.schema_test.TestField) (8.225) ✓ Pass: caffe2/caffe2/python:schema_test - testInitShouldSetFieldOffsetsIfNoChildren (caffe2.caffe2.python.schema_test.TestField) (8.339) ✓ Pass: caffe2/caffe2/python:schema_test - testInitShouldSetFieldOffsets (caffe2.caffe2.python.schema_test.TestField) (8.381) ``` Reviewed By: dzhulgakov Differential Revision: D24767188 fbshipit-source-id: b6ce8cc96ecc61768b55360e0238f7317a2f18ea
Author
Parents
Loading