Ejemplo n.º 1
0
def test_send(client: sy.VirtualMachineClient) -> None:
    syft_complex = Complex("2+3j")
    ptr = syft_complex.send(client)
    # Check pointer type
    assert ptr.__class__.__name__ == "ComplexPointer"

    # Check that we can get back the object
    res = ptr.get()
    assert res == syft_complex
Ejemplo n.º 2
0
def test_send() -> None:
    alice = sy.VirtualMachine(name="alice")
    alice_client = alice.get_client()

    syft_complex = Complex("2+3j")
    ptr = syft_complex.send(alice_client)
    # Check pointer type
    assert ptr.__class__.__name__ == "ComplexPointer"

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