Skip to content

Commit de455e7

Browse files
hawkinspjax authors
authored andcommitted
Fix small bug in random_test.
unsafe_buffer_pointer() and on_device_size_in_bytes() are methods, not properties, so presumably the test intended to call them rather than test equality of the bound methods. PiperOrigin-RevId: 614651090
1 parent 7863508 commit de455e7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/random_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,8 +1023,10 @@ def test_array_impl_attributes(self):
10231023
with jtu.ignore_warning(category=DeprecationWarning, message="arr.device"):
10241024
self.assertEqual(key.device(), key._base_array.device())
10251025
self.assertEqual(key.devices(), key._base_array.devices())
1026-
self.assertEqual(key.on_device_size_in_bytes, key._base_array.on_device_size_in_bytes)
1027-
self.assertEqual(key.unsafe_buffer_pointer, key._base_array.unsafe_buffer_pointer)
1026+
self.assertEqual(key.on_device_size_in_bytes(),
1027+
key._base_array.on_device_size_in_bytes())
1028+
self.assertEqual(key.unsafe_buffer_pointer(),
1029+
key._base_array.unsafe_buffer_pointer())
10281030
self.assertArraysEqual(key.addressable_data(0)._base_array,
10291031
key._base_array.addressable_data(0))
10301032
self.assertLen(key.addressable_shards, len(key._base_array.addressable_shards))

0 commit comments

Comments
 (0)