Skip to content
This repository was archived by the owner on Aug 22, 2024. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Revert the naming of the image_handle accessors.
  • Loading branch information
icaven committed Dec 15, 2023
commit 257564dfd6c9f609d597c20e016bc280120308a3
24 changes: 12 additions & 12 deletions src/python/k4a/tests/test_functional_api_azurekinect.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,9 @@ def test_functional_fast_api_capture_shallow_copy(self):
self.assertAlmostEqual(capture2.temperature, self.capture.temperature, 4)

# Check that the image handles are the same.
self.assertIs(capture2.color.image_handle, self.capture.color.image_handle)
self.assertIs(capture2.depth.image_handle, self.capture.depth.image_handle)
self.assertIs(capture2.ir.image_handle, self.capture.ir.image_handle)
self.assertIs(capture2.color._image_handle, self.capture.color._image_handle)
self.assertIs(capture2.depth._image_handle, self.capture.depth._image_handle)
self.assertIs(capture2.ir._image_handle, self.capture.ir._image_handle)

# Check that modifying one also modifies the other.
self.capture.temperature = self.capture.temperature + 1
Expand Down Expand Up @@ -375,9 +375,9 @@ def test_functional_fast_api_capture_deep_copy(self):
self.assertAlmostEqual(capture2.temperature, self.capture.temperature, 4)

# Check that the image handles are not the same.
self.assertIsNot(capture2.color.image_handle, self.capture.color.image_handle)
self.assertIsNot(capture2.depth.image_handle, self.capture.depth.image_handle)
self.assertIsNot(capture2.ir.image_handle, self.capture.ir.image_handle)
self.assertIsNot(capture2.color._image_handle, self.capture.color._image_handle)
self.assertIsNot(capture2.depth._image_handle, self.capture.depth._image_handle)
self.assertIsNot(capture2.ir._image_handle, self.capture.ir._image_handle)

# Check that modifying one does not modify the other.
self.capture.temperature = self.capture.temperature + 1
Expand Down Expand Up @@ -562,9 +562,9 @@ def test_functional_fast_api_image_shallow_copy(self):
self.check_copy(self.ir, ir2)

# Check that the image handles are the same.
self.assertIs(color2.image_handle, self.color.image_handle)
self.assertIs(depth2.image_handle, self.depth.image_handle)
self.assertIs(ir2.image_handle, self.ir.image_handle)
self.assertIs(color2._image_handle, self.color._image_handle)
self.assertIs(depth2._image_handle, self.depth._image_handle)
self.assertIs(ir2._image_handle, self.ir._image_handle)

# Check that modifying one also modifies the other.
self.color.white_balance = self.color.white_balance + 1
Expand Down Expand Up @@ -594,9 +594,9 @@ def test_functional_fast_api_image_deep_copy(self):
self.check_copy(self.ir, ir2)

# Check that the image handles are the same.
self.assertIsNot(color2.image_handle, self.color.image_handle)
self.assertIsNot(depth2.image_handle, self.depth.image_handle)
self.assertIsNot(ir2.image_handle, self.ir.image_handle)
self.assertIsNot(color2._image_handle, self.color._image_handle)
self.assertIsNot(depth2._image_handle, self.depth._image_handle)
self.assertIsNot(ir2._image_handle, self.ir._image_handle)

# Check that modifying one does not modifies the other.
self.color.white_balance = self.color.white_balance + 1
Expand Down