From f41086e59d847a5cc8e81dd4c4e2563c8c5a59c0 Mon Sep 17 00:00:00 2001 From: Levko Ivanchuk Date: Thu, 15 Oct 2020 19:18:09 +0300 Subject: [PATCH] Fix paramtest for empty values of a parameter (#2054) * Fix paramtest for empty values of a parameter (ros#2053) * Fix paramtest for empty values of a parameter (ros#2053) --- test/test_rosparam/test/test_dump.yaml | 2 +- tools/rostest/nodes/paramtest | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_rosparam/test/test_dump.yaml b/test/test_rosparam/test/test_dump.yaml index dda682f39c..20e9ff3fea 100644 --- a/test/test_rosparam/test/test_dump.yaml +++ b/test/test_rosparam/test/test_dump.yaml @@ -1 +1 @@ -{foo: bar} +foo: bar diff --git a/tools/rostest/nodes/paramtest b/tools/rostest/nodes/paramtest index a26ff2c3ad..4557d5f261 100755 --- a/tools/rostest/nodes/paramtest +++ b/tools/rostest/nodes/paramtest @@ -90,7 +90,7 @@ class ParamTest(unittest.TestCase): wallclock_timeout_t = time.time() + wait_time param_obtained = None - while not param_obtained and time.time() < wallclock_timeout_t: + while param_obtained is None and time.time() < wallclock_timeout_t: try: param_obtained = rospy.get_param(testattr_paramname_target) except KeyError as e: