(self)
| 311 | self.assertTrue(str(local_blob) not in ws.blobs) |
| 312 | |
| 313 | def test_while_net(self): |
| 314 | with NetBuilder() as nb: |
| 315 | x = ops.Const(0) |
| 316 | y = ops.Const(0) |
| 317 | with ops.WhileNet(): |
| 318 | with ops.Condition(): |
| 319 | ops.Add([x, ops.Const(1)], [x]) |
| 320 | ops.LT([x, ops.Const(7)]) |
| 321 | ops.Add([x, y], [y]) |
| 322 | |
| 323 | plan = Plan('while_net_test') |
| 324 | plan.AddStep(to_execution_step(nb)) |
| 325 | ws = workspace.C.Workspace() |
| 326 | ws.run(plan) |
| 327 | |
| 328 | x_value = ws.blobs[str(x)].fetch() |
| 329 | y_value = ws.blobs[str(y)].fetch() |
| 330 | |
| 331 | self.assertEqual(x_value, 7) |
| 332 | self.assertEqual(y_value, 21) |
nothing calls this directly
no test coverage detected