(temp_build_venv) PS C:\repos\Azure-Kinect-Sensor-SDK\src\python\k4a> python -m pytest tests -k _unit_ --junit-xml=./test_results.xml ================================================= test session starts ================================================= platform win32 -- Python 3.7.6, pytest-5.4.3, py-1.9.0, pluggy-0.13.1 rootdir: C:\repos\Azure-Kinect-Sensor-SDK\src\python\k4a collected 162 items / 127 deselected / 35 selected tests\test_unit_k4atypes.py ................................... [100%] ================================================== warnings summary =================================================== C:\Users\resuther\AppData\Local\Programs\Python\Python37\lib\site-packages\_pytest\junitxml.py:417 C:\Users\resuther\AppData\Local\Programs\Python\Python37\lib\site-packages\_pytest\junitxml.py:417: PytestDeprecationWarning: The 'junit_family' default value will change to 'xunit2' in pytest 6.0. Add 'junit_family=xunit1' to your pytest.ini file to keep the current format in future versions of pytest and silence this warning. _issue_warning_captured(deprecated.JUNIT_XML_DEFAULT_FAMILY, config.hook, 2) -- Docs: https://docs.pytest.org/en/latest/warnings.html ---------------- generated xml file: C:\repos\Azure-Kinect-Sensor-SDK\src\python\k4a\test_results.xml ----------------- ==================================== 35 passed, 127 deselected, 1 warning in 0.41s ==================================== (temp_build_venv) PS C:\repos\Azure-Kinect-Sensor-SDK\src\python\k4a> python -m pytest tests -k _unit_ ================================================= test session starts ================================================= platform win32 -- Python 3.7.6, pytest-5.4.3, py-1.9.0, pluggy-0.13.1 rootdir: C:\repos\Azure-Kinect-Sensor-SDK\src\python\k4a collected 162 items / 127 deselected / 35 selected tests\test_unit_k4atypes.py ................................... [100%] ========================================= 35 passed, 127 deselected in 0.26s ========================================== (temp_build_venv) PS C:\repos\Azure-Kinect-Sensor-SDK\src\python\k4a> python -m pytest tests -k functional_fast ================================================= test session starts ================================================= platform win32 -- Python 3.7.6, pytest-5.4.3, py-1.9.0, pluggy-0.13.1 rootdir: C:\repos\Azure-Kinect-Sensor-SDK\src\python\k4a collected 162 items / 53 deselected / 109 selected tests\test_functional_api_azurekinect.py ...................................................... [ 49%] tests\test_functional_ctypes_azurekinect.py ....................................................... [100%] =================================== 109 passed, 53 deselected in 107.08s (0:01:47) ==================================== (temp_build_venv) PS C:\repos\Azure-Kinect-Sensor-SDK\src\python\k4a> python -m pytest tests -k functional ================================================= test session starts ================================================= platform win32 -- Python 3.7.6, pytest-5.4.3, py-1.9.0, pluggy-0.13.1 rootdir: C:\repos\Azure-Kinect-Sensor-SDK\src\python\k4a collected 162 items / 35 deselected / 127 selected tests\test_functional_api_azurekinect.py .............................................FFFFFFFFF......... [ 49%] tests\test_functional_ctypes_azurekinect.py FF...F.......................................................... [100%] ====================================================== FAILURES ======================================================= _______________ Test_Functional_API_Transformation_AzureKinect.test_functional_api_color_2d_to_depth_2d _______________ self = def test_functional_api_color_2d_to_depth_2d(self): > for depth_mode in Test_Transformation_AzureKinect.depth_modes[:4]: E NameError: name 'Test_Transformation_AzureKinect' is not defined tests\test_functional_api_azurekinect.py:1270: NameError ___________ Test_Functional_API_Transformation_AzureKinect.test_functional_api_color_image_to_depth_camera ____________ self = def test_functional_api_color_image_to_depth_camera(self): > for depth_mode in Test_Transformation_AzureKinect.depth_modes[:4]: E NameError: name 'Test_Transformation_AzureKinect' is not defined tests\test_functional_api_azurekinect.py:1402: NameError ___________ Test_Functional_API_Transformation_AzureKinect.test_functional_api_depth_image_to_color_camera ____________ self = def test_functional_api_depth_image_to_color_camera(self): > for depth_mode in Test_Transformation_AzureKinect.depth_modes[:4]: E NameError: name 'Test_Transformation_AzureKinect' is not defined tests\test_functional_api_azurekinect.py:1313: NameError ________ Test_Functional_API_Transformation_AzureKinect.test_functional_api_depth_image_to_color_camera_custom ________ self = def test_functional_api_depth_image_to_color_camera_custom(self): > for depth_mode in Test_Transformation_AzureKinect.depth_modes[:4]: E NameError: name 'Test_Transformation_AzureKinect' is not defined tests\test_functional_api_azurekinect.py:1351: NameError ____________ Test_Functional_API_Transformation_AzureKinect.test_functional_api_depth_image_to_point_cloud ____________ self = def test_functional_api_depth_image_to_point_cloud(self): > for depth_mode in Test_Transformation_AzureKinect.depth_modes[:4]: E NameError: name 'Test_Transformation_AzureKinect' is not defined tests\test_functional_api_azurekinect.py:1442: NameError _______________ Test_Functional_API_Transformation_AzureKinect.test_functional_api_pixel_2d_to_pixel_2d _______________ self = def test_functional_api_pixel_2d_to_pixel_2d(self): > for depth_mode in Test_Transformation_AzureKinect.depth_modes: E NameError: name 'Test_Transformation_AzureKinect' is not defined tests\test_functional_api_azurekinect.py:1241: NameError _______________ Test_Functional_API_Transformation_AzureKinect.test_functional_api_pixel_2d_to_point_3d _______________ self = def test_functional_api_pixel_2d_to_point_3d(self): > for depth_mode in Test_Transformation_AzureKinect.depth_modes: E NameError: name 'Test_Transformation_AzureKinect' is not defined tests\test_functional_api_azurekinect.py:1183: NameError _______________ Test_Functional_API_Transformation_AzureKinect.test_functional_api_point_3d_to_pixel_2d _______________ self = def test_functional_api_point_3d_to_pixel_2d(self): > for depth_mode in Test_Transformation_AzureKinect.depth_modes: E NameError: name 'Test_Transformation_AzureKinect' is not defined tests\test_functional_api_azurekinect.py:1213: NameError _______________ Test_Functional_API_Transformation_AzureKinect.test_functional_api_point_3d_to_point_3d _______________ self = def test_functional_api_point_3d_to_point_3d(self): > for depth_mode in Test_Transformation_AzureKinect.depth_modes: E NameError: name 'Test_Transformation_AzureKinect' is not defined tests\test_functional_api_azurekinect.py:1154: NameError ___________________ Test_Functional_Ctypes_AzureKinect.test_functional_ctypes_calibration_2d_to_2d ____________________ self = def test_functional_ctypes_calibration_2d_to_2d(self): with self.lock: depth_modes = [ k4a.EDepthMode.NFOV_2X2BINNED, k4a.EDepthMode.NFOV_UNBINNED, k4a.EDepthMode.WFOV_2X2BINNED, k4a.EDepthMode.WFOV_UNBINNED, k4a.EDepthMode.PASSIVE_IR, ] color_resolutions = [ k4a.EColorResolution.RES_3072P, k4a.EColorResolution.RES_2160P, k4a.EColorResolution.RES_1536P, k4a.EColorResolution.RES_1440P, k4a.EColorResolution.RES_1080P, k4a.EColorResolution.RES_720P, ] calibration_types = [ k4a.ECalibrationType.COLOR, k4a.ECalibrationType.DEPTH ] calibration = k4a._bindings.k4a._Calibration() source_point = k4a._bindings.k4a._Float2(300, 300) depth_mm = 500 target_point = k4a._bindings.k4a._Float2() valid_int_flag = ctypes.c_int(0) for depth_mode in depth_modes: for color_resolution in color_resolutions: for source_camera in calibration_types: for target_camera in calibration_types: with self.subTest(depth_mode = depth_mode, color_resolution = color_resolution, source_camera = source_camera, target_camera = target_camera): status = k4a._bindings.k4a.k4a_device_get_calibration( self.device_handle, depth_mode, color_resolution, ctypes.byref(calibration)) self.assertTrue(k4a.K4A_SUCCEEDED(status)) # Transform source point from source_camera to target_camera. status = k4a._bindings.k4a.k4a_calibration_2d_to_2d( ctypes.byref(calibration), ctypes.byref(source_point), depth_mm, source_camera, target_camera, ctypes.byref(target_point), ctypes.byref(valid_int_flag)) self.assertTrue(k4a.K4A_SUCCEEDED(status)) > self.assertEqual(valid_int_flag.value, 1) E AssertionError: 0 != 1 tests\test_functional_ctypes_azurekinect.py:1389: AssertionError ___________________ Test_Functional_Ctypes_AzureKinect.test_functional_ctypes_calibration_2d_to_3d ____________________ self = def test_functional_ctypes_calibration_2d_to_3d(self): with self.lock: depth_modes = [ k4a.EDepthMode.NFOV_2X2BINNED, k4a.EDepthMode.NFOV_UNBINNED, k4a.EDepthMode.WFOV_2X2BINNED, k4a.EDepthMode.WFOV_UNBINNED, k4a.EDepthMode.PASSIVE_IR, ] color_resolutions = [ k4a.EColorResolution.RES_3072P, k4a.EColorResolution.RES_2160P, k4a.EColorResolution.RES_1536P, k4a.EColorResolution.RES_1440P, k4a.EColorResolution.RES_1080P, k4a.EColorResolution.RES_720P, ] calibration_types = [ k4a.ECalibrationType.COLOR, k4a.ECalibrationType.DEPTH ] calibration = k4a._bindings.k4a._Calibration() source_point = k4a._bindings.k4a._Float2(300, 300) depth_mm = 500.0 target_point = k4a._bindings.k4a._Float3() valid_int_flag = ctypes.c_int(0) for depth_mode in depth_modes: for color_resolution in color_resolutions: for source_camera in calibration_types: for target_camera in calibration_types: with self.subTest(depth_mode = depth_mode, color_resolution = color_resolution, source_camera = source_camera, target_camera = target_camera): status = k4a._bindings.k4a.k4a_device_get_calibration( self.device_handle, depth_mode, color_resolution, ctypes.byref(calibration)) self.assertTrue(k4a.K4A_SUCCEEDED(status)) # Transform source point from source_camera to target_camera. status = k4a._bindings.k4a.k4a_calibration_2d_to_3d( ctypes.byref(calibration), ctypes.byref(source_point), ctypes.c_float(depth_mm), ctypes.c_int(source_camera), ctypes.c_int(target_camera), ctypes.byref(target_point), ctypes.byref(valid_int_flag)) self.assertTrue(k4a.K4A_SUCCEEDED(status)) > self.assertEqual(valid_int_flag.value, 1) E AssertionError: 0 != 1 tests\test_functional_ctypes_azurekinect.py:1270: AssertionError ________ Test_Functional_Ctypes_AzureKinect.test_functional_ctypes_transformation_color_image_to_depth_camera _________ self = def test_functional_ctypes_transformation_color_image_to_depth_camera(self): with self.lock: depth_modes = [ k4a.EDepthMode.NFOV_2X2BINNED, k4a.EDepthMode.NFOV_UNBINNED, k4a.EDepthMode.WFOV_2X2BINNED, k4a.EDepthMode.WFOV_UNBINNED, ] color_resolutions = [ k4a.EColorResolution.RES_3072P, k4a.EColorResolution.RES_2160P, k4a.EColorResolution.RES_1536P, k4a.EColorResolution.RES_1440P, k4a.EColorResolution.RES_1080P, k4a.EColorResolution.RES_720P, ] calibration = k4a._bindings.k4a._Calibration() for depth_mode in depth_modes: for color_resolution in color_resolutions: with self.subTest(depth_mode = depth_mode, color_resolution = color_resolution): status = k4a._bindings.k4a.k4a_device_get_calibration( self.device_handle, depth_mode, color_resolution, ctypes.byref(calibration)) self.assertTrue(k4a.K4A_SUCCEEDED(status)) transformation = k4a._bindings.k4a.k4a_transformation_create(ctypes.byref(calibration)) self.assertIsNotNone(transformation) # Might not be a valid assert. # Get a capture and depth and color images. capture = test_config.get_capture(self.device_handle, k4a.EImageFormat.COLOR_BGRA32, color_resolution, depth_mode) depth_image = k4a._bindings.k4a.k4a_capture_get_depth_image(capture) color_image = k4a._bindings.k4a.k4a_capture_get_color_image(capture) # Create an output image. image_format = k4a._bindings.k4a.k4a_image_get_format(color_image) width_pixels = k4a._bindings.k4a.k4a_image_get_width_pixels(depth_image) height_pixels = k4a._bindings.k4a.k4a_image_get_height_pixels(depth_image) stride_bytes = width_pixels * 4 transformed_image = k4a._bindings.k4a._ImageHandle() status = k4a._bindings.k4a.k4a_image_create( image_format, width_pixels, height_pixels, stride_bytes, ctypes.byref(transformed_image) ) > self.assertTrue(k4a.K4A_SUCCEEDED(status)) E AssertionError: False is not true tests\test_functional_ctypes_azurekinect.py:1995: AssertionError ------------------------------------------------ Captured stdout call ------------------------------------------------- [2021-04-14 16:15:40.574] [error] [t=24652] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (118): k4a_capture_t_get_context(). Invalid k4a_capture_t 0000000000000000 [2021-04-14 16:15:40.574] [error] [t=24652] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (359): Invalid argument to capture_get_depth_image(). capture_handle (0000000000000000) is not a valid handle of type k4a_capture_t [2021-04-14 16:15:40.574] [error] [t=24652] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (118): k4a_capture_t_get_context(). Invalid k4a_capture_t 0000000000000000 [2021-04-14 16:15:40.574] [error] [t=24652] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (344): Invalid argument to capture_get_color_image(). capture_handle (0000000000000000) is not a valid handle of type k4a_capture_t [2021-04-14 16:15:40.574] [error] [t=24652] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\image\image.c (51): k4a_image_t_get_context(). Invalid k4a_image_t 0000000000000000 [2021-04-14 16:15:40.574] [error] [t=24652] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\image\image.c (413): Invalid argument to image_get_format(). image_handle (0000000000000000) is not a valid handle of type k4a_image_t [2021-04-14 16:15:40.574] [error] [t=24652] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\image\image.c (51): k4a_image_t_get_context(). Invalid k4a_image_t 0000000000000000 [2021-04-14 16:15:40.574] [error] [t=24652] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\image\image.c (420): Invalid argument to image_get_width_pixels(). image_handle (0000000000000000) is not a valid handle of type k4a_image_t [2021-04-14 16:15:40.574] [error] [t=24652] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\image\image.c (51): k4a_image_t_get_context(). Invalid k4a_image_t 0000000000000000 [2021-04-14 16:15:40.574] [error] [t=24652] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\image\image.c (427): Invalid argument to image_get_height_pixels(). image_handle (0000000000000000) is not a valid handle of type k4a_image_t [2021-04-14 16:15:40.574] [error] [t=24652] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\image\image.c (169): Invalid argument to image_create(). !(width_pixels > 0 && width_pixels < 20000) [2021-04-14 16:15:40.574] [error] [t=24652] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\image\image.c (169): image_create() returned failure. =============================================== short test summary info =============================================== FAILED tests/test_functional_api_azurekinect.py::Test_Functional_API_Transformation_AzureKinect::test_functional_api_color_2d_to_depth_2d FAILED tests/test_functional_api_azurekinect.py::Test_Functional_API_Transformation_AzureKinect::test_functional_api_color_image_to_depth_camera FAILED tests/test_functional_api_azurekinect.py::Test_Functional_API_Transformation_AzureKinect::test_functional_api_depth_image_to_color_camera FAILED tests/test_functional_api_azurekinect.py::Test_Functional_API_Transformation_AzureKinect::test_functional_api_depth_image_to_color_camera_custom FAILED tests/test_functional_api_azurekinect.py::Test_Functional_API_Transformation_AzureKinect::test_functional_api_depth_image_to_point_cloud FAILED tests/test_functional_api_azurekinect.py::Test_Functional_API_Transformation_AzureKinect::test_functional_api_pixel_2d_to_pixel_2d FAILED tests/test_functional_api_azurekinect.py::Test_Functional_API_Transformation_AzureKinect::test_functional_api_pixel_2d_to_point_3d FAILED tests/test_functional_api_azurekinect.py::Test_Functional_API_Transformation_AzureKinect::test_functional_api_point_3d_to_pixel_2d FAILED tests/test_functional_api_azurekinect.py::Test_Functional_API_Transformation_AzureKinect::test_functional_api_point_3d_to_point_3d FAILED tests/test_functional_ctypes_azurekinect.py::Test_Functional_Ctypes_AzureKinect::test_functional_ctypes_calibration_2d_to_2d FAILED tests/test_functional_ctypes_azurekinect.py::Test_Functional_Ctypes_AzureKinect::test_functional_ctypes_calibration_2d_to_3d FAILED tests/test_functional_ctypes_azurekinect.py::Test_Functional_Ctypes_AzureKinect::test_functional_ctypes_transformation_color_image_to_depth_camera ============================== 12 failed, 115 passed, 35 deselected in 330.13s (0:05:30) ==============================