Major functionality lives in serialized_test_util.py
SerializedTestCase
@given
decorator to @given_and_seeded
. This runs a seeded hypothesis test instance which will generate outputs if desired in addition to the unseeded hypothesis tests normally run.unittest.main()
in __main__
to testWithArgs
.python caffe2/python/operator_test/my_test.py -g
to generate serialized outputs. They will live in caffe2/python/serialized_test/data/operator_test
, one folder per test functionIf we'd like to extend the test framework beyond that for operator tests, we can create a new subfolder for them inside caffe2/python/serialized_test/data
.