| 1001 | |
| 1002 | |
| 1003 | def test_eq(): |
| 1004 | items = [ |
| 1005 | lambda: (flight.Action("foo", b""), flight.Action("bar", b"")), |
| 1006 | lambda: (flight.Action("foo", b""), flight.Action("foo", b"bar")), |
| 1007 | lambda: (flight.ActionType("foo", "bar"), |
| 1008 | flight.ActionType("foo", "baz")), |
| 1009 | lambda: (flight.BasicAuth("user", "pass"), |
| 1010 | flight.BasicAuth("user2", "pass")), |
| 1011 | lambda: (flight.BasicAuth("user", "pass"), |
| 1012 | flight.BasicAuth("user", "pass2")), |
| 1013 | lambda: (flight.FlightDescriptor.for_command("foo"), |
| 1014 | flight.FlightDescriptor.for_path("foo")), |
| 1015 | lambda: (flight.FlightEndpoint(b"foo", []), |
| 1016 | flight.FlightEndpoint(b"bar", [])), |
| 1017 | lambda: ( |
| 1018 | flight.FlightEndpoint( |
| 1019 | b"foo", [flight.Location("grpc+tcp://localhost:1234")]), |
| 1020 | flight.FlightEndpoint( |
| 1021 | b"foo", [flight.Location("grpc+tls://localhost:1234")]) |
| 1022 | ), |
| 1023 | lambda: ( |
| 1024 | flight.FlightEndpoint( |
| 1025 | b"foo", [], pa.scalar("2023-04-05T12:34:56").cast(pa.timestamp("s"))), |
| 1026 | flight.FlightEndpoint( |
| 1027 | b"foo", [], |
| 1028 | pa.scalar("2023-04-05T12:34:56.789").cast(pa.timestamp("ms")))), |
| 1029 | lambda: (flight.FlightEndpoint(b"foo", [], app_metadata=b''), |
| 1030 | flight.FlightEndpoint(b"foo", [], app_metadata=b'meta')), |
| 1031 | lambda: ( |
| 1032 | flight.FlightInfo( |
| 1033 | pa.schema([]), |
| 1034 | flight.FlightDescriptor.for_path(), []), |
| 1035 | flight.FlightInfo( |
| 1036 | pa.schema([("ints", pa.int64())]), |
| 1037 | flight.FlightDescriptor.for_path(), [])), |
| 1038 | lambda: ( |
| 1039 | flight.FlightInfo( |
| 1040 | pa.schema([]), |
| 1041 | flight.FlightDescriptor.for_path(), []), |
| 1042 | flight.FlightInfo( |
| 1043 | pa.schema([]), |
| 1044 | flight.FlightDescriptor.for_command(b"foo"), [])), |
| 1045 | lambda: ( |
| 1046 | flight.FlightInfo( |
| 1047 | pa.schema([]), |
| 1048 | flight.FlightDescriptor.for_path(), |
| 1049 | [flight.FlightEndpoint(b"foo", [])]), |
| 1050 | flight.FlightInfo( |
| 1051 | pa.schema([]), |
| 1052 | flight.FlightDescriptor.for_path(), |
| 1053 | [flight.FlightEndpoint(b"bar", [])])), |
| 1054 | lambda: ( |
| 1055 | flight.FlightInfo( |
| 1056 | pa.schema([]), |
| 1057 | flight.FlightDescriptor.for_path(), [], total_records=-1), |
| 1058 | flight.FlightInfo( |
| 1059 | pa.schema([]), |
| 1060 | flight.FlightDescriptor.for_path(), [], total_records=1)), |