|
12 | 12 | @pytest.mark.parametrize( |
13 | 13 | "a, b, equal", |
14 | 14 | [ |
15 | | - (Address("0x0"), Address("0x0"), True), |
16 | | - (Address("0x0"), Address("0x1"), False), |
17 | | - (Address("0x1"), Address("0x0"), False), |
18 | | - (Address("0x1"), "0x1", True), |
19 | | - (Address("0x1"), "0x2", False), |
20 | | - (Address("0x1"), 1, True), |
21 | | - (Address("0x1"), 2, False), |
22 | | - (Address("0x1"), b"\x01", True), |
23 | | - (Address("0x1"), b"\x02", False), |
24 | | - ("0x1", Address("0x1"), True), |
25 | | - ("0x2", Address("0x1"), False), |
26 | | - (1, Address("0x1"), True), |
27 | | - (2, Address("0x1"), False), |
28 | | - (b"\x01", Address("0x1"), True), |
29 | | - (b"\x02", Address("0x1"), False), |
30 | | - (Hash("0x0"), Hash("0x0"), True), |
31 | | - (Hash("0x0"), Hash("0x1"), False), |
32 | | - (Hash("0x1"), Hash("0x0"), False), |
33 | | - (Hash("0x1"), "0x1", True), |
34 | | - (Hash("0x1"), "0x2", False), |
35 | | - (Hash("0x1"), 1, True), |
36 | | - (Hash("0x1"), 2, False), |
37 | | - (Hash("0x1"), b"\x01", True), |
38 | | - (Hash("0x1"), b"\x02", False), |
39 | | - ("0x1", Hash("0x1"), True), |
40 | | - ("0x2", Hash("0x1"), False), |
41 | | - (1, Hash("0x1"), True), |
42 | | - (2, Hash("0x1"), False), |
| 15 | + (Address(0), Address(0), True), |
| 16 | + ( |
| 17 | + Address("0x0000000000000000000000000000000000000000"), |
| 18 | + Address("0x0000000000000000000000000000000000000000"), |
| 19 | + True, |
| 20 | + ), |
| 21 | + ( |
| 22 | + Address("0x0000000000000000000000000000000000000000"), |
| 23 | + Address("0x0000000000000000000000000000000000000001"), |
| 24 | + False, |
| 25 | + ), |
| 26 | + ( |
| 27 | + Address("0x0000000000000000000000000000000000000001"), |
| 28 | + Address("0x0000000000000000000000000000000000000000"), |
| 29 | + False, |
| 30 | + ), |
| 31 | + ( |
| 32 | + Address("0x0000000000000000000000000000000000000001"), |
| 33 | + "0x0000000000000000000000000000000000000001", |
| 34 | + True, |
| 35 | + ), |
| 36 | + ( |
| 37 | + Address("0x0000000000000000000000000000000000000001"), |
| 38 | + "0x0000000000000000000000000000000000000002", |
| 39 | + False, |
| 40 | + ), |
| 41 | + (Address("0x0000000000000000000000000000000000000001"), 1, True), |
| 42 | + (Address("0x0000000000000000000000000000000000000001"), 2, False), |
| 43 | + ( |
| 44 | + Address("0x0000000000000000000000000000000000000001"), |
| 45 | + b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", |
| 46 | + True, |
| 47 | + ), |
| 48 | + ( |
| 49 | + Address("0x0000000000000000000000000000000000000001"), |
| 50 | + b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", |
| 51 | + False, |
| 52 | + ), |
| 53 | + ( |
| 54 | + "0x0000000000000000000000000000000000000001", |
| 55 | + Address("0x0000000000000000000000000000000000000001"), |
| 56 | + True, |
| 57 | + ), |
| 58 | + ( |
| 59 | + "0x0000000000000000000000000000000000000002", |
| 60 | + Address("0x0000000000000000000000000000000000000001"), |
| 61 | + False, |
| 62 | + ), |
| 63 | + (1, Address("0x0000000000000000000000000000000000000001"), True), |
| 64 | + (2, Address("0x0000000000000000000000000000000000000001"), False), |
| 65 | + ( |
| 66 | + b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", |
| 67 | + Address("0x0000000000000000000000000000000000000001"), |
| 68 | + True, |
| 69 | + ), |
| 70 | + ( |
| 71 | + b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", |
| 72 | + Address("0x0000000000000000000000000000000000000001"), |
| 73 | + False, |
| 74 | + ), |
| 75 | + ( |
| 76 | + Hash("0x0000000000000000000000000000000000000000000000000000000000000000"), |
| 77 | + Hash("0x0000000000000000000000000000000000000000000000000000000000000000"), |
| 78 | + True, |
| 79 | + ), |
| 80 | + ( |
| 81 | + Hash("0x0000000000000000000000000000000000000000000000000000000000000000"), |
| 82 | + Hash("0x0000000000000000000000000000000000000000000000000000000000000001"), |
| 83 | + False, |
| 84 | + ), |
| 85 | + ( |
| 86 | + Hash("0x0000000000000000000000000000000000000000000000000000000000000001"), |
| 87 | + Hash("0x0000000000000000000000000000000000000000000000000000000000000000"), |
| 88 | + False, |
| 89 | + ), |
| 90 | + ( |
| 91 | + Hash("0x0000000000000000000000000000000000000000000000000000000000000001"), |
| 92 | + "0x0000000000000000000000000000000000000000000000000000000000000001", |
| 93 | + True, |
| 94 | + ), |
| 95 | + ( |
| 96 | + Hash("0x0000000000000000000000000000000000000000000000000000000000000001"), |
| 97 | + "0x0000000000000000000000000000000000000000000000000000000000000002", |
| 98 | + False, |
| 99 | + ), |
| 100 | + (Hash("0x0000000000000000000000000000000000000000000000000000000000000001"), 1, True), |
| 101 | + (Hash("0x0000000000000000000000000000000000000000000000000000000000000001"), 2, False), |
| 102 | + ( |
| 103 | + Hash("0x0000000000000000000000000000000000000000000000000000000000000001"), |
| 104 | + b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| 105 | + b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", |
| 106 | + True, |
| 107 | + ), |
| 108 | + ( |
| 109 | + Hash("0x0000000000000000000000000000000000000000000000000000000000000001"), |
| 110 | + b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| 111 | + b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", |
| 112 | + False, |
| 113 | + ), |
| 114 | + ( |
| 115 | + "0x0000000000000000000000000000000000000000000000000000000000000001", |
| 116 | + Hash("0x0000000000000000000000000000000000000000000000000000000000000001"), |
| 117 | + True, |
| 118 | + ), |
| 119 | + ( |
| 120 | + "0x0000000000000000000000000000000000000000000000000000000000000002", |
| 121 | + Hash("0x0000000000000000000000000000000000000000000000000000000000000001"), |
| 122 | + False, |
| 123 | + ), |
| 124 | + (1, Hash("0x0000000000000000000000000000000000000000000000000000000000000001"), True), |
| 125 | + (2, Hash("0x0000000000000000000000000000000000000000000000000000000000000001"), False), |
43 | 126 | ], |
44 | 127 | ) |
45 | 128 | def test_comparisons(a: Any, b: Any, equal: bool): |
|
0 commit comments