(self, x)
| 105 | |
| 106 | @given(x=hu.tensor()) |
| 107 | def test_reshape(self, x): |
| 108 | def f(inputs, outputs): |
| 109 | outputs[0].reshape(inputs[0].shape) |
| 110 | self.assertEqual(x.shape, inputs[0].shape) |
| 111 | self.assertEqual(x.shape, outputs[0].shape) |
| 112 | outputs[0].data[...] = inputs[0].data |
| 113 | |
| 114 | op = CreatePythonOperator(f, ["x"], ["y"]) |
| 115 | workspace.FeedBlob("x", x) |
| 116 | workspace.RunOperatorOnce(op) |
| 117 | y = workspace.FetchBlob("y") |
| 118 | np.testing.assert_almost_equal(x, y) |
| 119 | |
| 120 | @given(x=hu.tensor()) |
| 121 | def test_workspace_manipulation(self, x): |
nothing calls this directly
no test coverage detected