We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b940aab commit 0e6886eCopy full SHA for 0e6886e
test/test_pointclouds.py
@@ -75,12 +75,19 @@ def test_roundtrip(self):
75
np.testing.assert_equal(points_arr, new_points_arr)
76
77
def test_roundtrip_numpy(self):
78
-
79
points_arr = self.makeArray(100)
80
cloud_msg = rnp.msgify(PointCloud2, points_arr)
81
new_points_arr = rnp.numpify(cloud_msg)
82
83
84
+ def test_roundtrip_zero_points(self):
85
+ """Test to make sure zero point arrays don't raise memoryview.cast(*) errors"""
86
+ points_arr = self.makeArray(0)
87
+ cloud_msg = rnp.msgify(PointCloud2, points_arr)
88
+ new_points_arr = rnp.numpify(cloud_msg)
89
+
90
+ np.testing.assert_equal(points_arr, new_points_arr)
91
92
if __name__ == '__main__':
93
unittest.main()
0 commit comments