예제 #1
0
def test_send(client: sy.VirtualMachineClient) -> None:
    syft_int = Int(5)
    ptr = syft_int.send(client)
    # Check pointer type
    assert ptr.__class__.__name__ == "IntPointer"

    # Check that we can get back the object
    res = ptr.get()
    assert res == syft_int
예제 #2
0
파일: serde_test.py 프로젝트: znreza/PySyft
def test_send() -> None:
    alice = sy.VirtualMachine(name="alice")
    alice_client = alice.get_client()

    syft_int = Int(5)
    ptr = syft_int.send(alice_client)
    # Check pointer type
    assert ptr.__class__.__name__ == "IntPointer"

    # Check that we can get back the object
    res = ptr.get()
    assert res == syft_int