()
| 458 | |
| 459 | @pytest.mark.skipif(not env.has_rpc(), reason="need rpc") |
| 460 | def test_local_func(): |
| 461 | client = rpc.LocalSession() |
| 462 | |
| 463 | def check_remote(): |
| 464 | f1 = client.get_function("rpc.test.add_to_lhs") |
| 465 | fadd = f1(10) |
| 466 | assert fadd(12) == 22 |
| 467 | |
| 468 | blob = bytearray(np.random.randint(0, 10, size=(10))) |
| 469 | client.upload(blob, "dat.bin") |
| 470 | rev = client.download("dat.bin") |
| 471 | assert rev == blob |
| 472 | |
| 473 | check_remote() |
| 474 | |
| 475 | |
| 476 | @pytest.mark.skipif(not env.has_rpc(), reason="need rpc") |
nothing calls this directly
no test coverage detected
searching dependent graphs…