コード例 #1
0
ファイル: serde_test.py プロジェクト: yashlamba/PySyft
def test_send(client: sy.VirtualMachineClient) -> None:
    syft_float = Float(5)
    ptr = syft_float.send(client)
    # Check pointer type
    assert ptr.__class__.__name__ == "FloatPointer"

    # Check that we can get back the object
    res = ptr.get()
    assert res == syft_float
コード例 #2
0
ファイル: serde_test.py プロジェクト: znreza/PySyft
def test_send() -> None:
    alice = sy.VirtualMachine(name="alice")
    alice_client = alice.get_client()

    syft_float = Float(5)
    ptr = syft_float.send(alice_client)
    # Check pointer type
    assert ptr.__class__.__name__ == "FloatPointer"

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