diff --git a/aruco_pose/test/largemap.py b/aruco_pose/test/largemap.py
index e27fe570..60e9c5e2 100755
--- a/aruco_pose/test/largemap.py
+++ b/aruco_pose/test/largemap.py
@@ -1,26 +1,19 @@
-#!/usr/bin/env python3
-import sys
-import unittest
-import json
import rospy
-import rostest
+import pytest
from sensor_msgs.msg import Image
from visualization_msgs.msg import MarkerArray as VisMarkerArray
+@pytest.fixture
+def node():
+ return rospy.init_node('test_aruco_largemap', anonymous=True)
-class TestArucoPose(unittest.TestCase):
- def setUp(self):
- rospy.init_node('test_aruco_largemap', anonymous=True)
+def test_large_map_image(node):
+ img = rospy.wait_for_message('aruco_map/image', Image, timeout=5)
+ assert img.width == 2000
+ assert img.height == 2000
+ assert img.encoding in ('mono8', 'rgb8')
- def test_map_image(self):
- img = rospy.wait_for_message('aruco_map/image', Image, timeout=5)
- self.assertEqual(img.width, 2000)
- self.assertEqual(img.height, 2000)
- self.assertIn(img.encoding, ('mono8', 'rgb8'))
-
- def test_map_visualization(self):
- vis = rospy.wait_for_message('aruco_map/visualization', VisMarkerArray, timeout=5)
-
-
-rostest.rosrun('aruco_pose', 'test_aruco_largemap', TestArucoPose, sys.argv)
+def test_large_map_visualization(node):
+ vis = rospy.wait_for_message('aruco_map/visualization', VisMarkerArray, timeout=5)
+ assert len(vis.markers) == 11
diff --git a/aruco_pose/test/largemap.test b/aruco_pose/test/largemap.test
index 799e1839..c26da411 100644
--- a/aruco_pose/test/largemap.test
+++ b/aruco_pose/test/largemap.test
@@ -9,5 +9,6 @@
-
+
+