Skip to content

Commit

Permalink
Clean qos zenoh tests (#1369)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
ahcorde authored Oct 11, 2024
1 parent 4d7ff97 commit a09a031
Show file tree
Hide file tree
Showing 2 changed files with 199 additions and 176 deletions.
17 changes: 13 additions & 4 deletions rclpy/test/test_qos.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import warnings

from rclpy.duration import Duration
from rclpy.impl.implementation_singleton import rclpy_implementation as _rclpy
from rclpy.qos import InvalidQoSProfileException
from rclpy.qos import qos_check_compatible
from rclpy.qos import qos_profile_system_default
Expand Down Expand Up @@ -187,8 +188,12 @@ def test_incompatible(self):
pub_qos, sub_qos
)

assert compatibility == QoSCompatibility.ERROR
assert reason != ''
if _rclpy.rclpy_get_rmw_implementation_identifier() != 'rmw_zenoh_cpp':
assert compatibility == QoSCompatibility.ERROR
assert reason != ''
else:
assert compatibility == QoSCompatibility.OK
assert reason == ''

def test_warn_of_possible_incompatibility(self):
"""
Expand All @@ -206,5 +211,9 @@ def test_warn_of_possible_incompatibility(self):
pub_qos, sub_qos
)

assert compatibility == QoSCompatibility.WARNING
assert reason != ''
if _rclpy.rclpy_get_rmw_implementation_identifier() != 'rmw_zenoh_cpp':
assert compatibility == QoSCompatibility.WARNING
assert reason != ''
else:
assert compatibility == QoSCompatibility.OK
assert reason == ''
Loading

0 comments on commit a09a031

Please sign in to comment.