MCPcopy Index your code
hub / github.com/pytorch/pytorch / test_exception_builder

Method test_exception_builder

caffe2/python/python_op_test.py:60–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

58 workspace.RunOperatorOnce(op)
59
60 def test_exception_builder(self):
61 op = CreatePythonOperator(MainOpFunctionThatThrowsCustomErrorInBuilder, [], [])
62 with self.assertRaisesRegex(CustomError, "This is an intentional exception in builder."):
63 workspace.RunOperatorOnce(op)
64
65 @given(x=hu.tensor())
66 def test_feed_with_helper_function(self, x):

Callers

nothing calls this directly

Calls 2

CreatePythonOperatorFunction · 0.90
assertRaisesRegexMethod · 0.80

Tested by

no test coverage detected