From 8e726d561ac64334141606c50a7b65c8ac7bfc57 Mon Sep 17 00:00:00 2001 From: Claudio-Daniel Freire Date: Tue, 9 Aug 2011 17:34:53 +0200 Subject: [PATCH] Test fix: make the trace-checking regex accept exponential notation of numbers --- test/testbeds/ns3/integration.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/testbeds/ns3/integration.py b/test/testbeds/ns3/integration.py index f14a40ff..12a41af9 100755 --- a/test/testbeds/ns3/integration.py +++ b/test/testbeds/ns3/integration.py @@ -99,10 +99,10 @@ class Ns3IntegrationTestCase(unittest.TestCase): while not controller.is_finished(app.guid): time.sleep(0.5) ping_result = controller.trace(iface2.guid, "FdAsciiTrace") - ping_exp_result = r"""r \d+\.\d+ /NodeList/0/DeviceList/0/\$ns3::FdNetDevice/Rx Payload \(size=42\) -r \d+\.\d+ /NodeList/0/DeviceList/0/\$ns3::FdNetDevice/Rx Payload \(size=98\) -r \d+\.\d+ /NodeList/0/DeviceList/0/\$ns3::FdNetDevice/Rx Payload \(size=42\) -r \d+\.\d+ /NodeList/0/DeviceList/0/\$ns3::FdNetDevice/Rx Payload \(size=98\) + ping_exp_result = r"""r [-+0-9.e]+ /NodeList/0/DeviceList/0/\$ns3::FdNetDevice/Rx Payload \(size=42\) +r [-+0-9.e]+ /NodeList/0/DeviceList/0/\$ns3::FdNetDevice/Rx Payload \(size=98\) +r [-+0-9.e]+ /NodeList/0/DeviceList/0/\$ns3::FdNetDevice/Rx Payload \(size=42\) +r [-+0-9.e]+ /NodeList/0/DeviceList/0/\$ns3::FdNetDevice/Rx Payload \(size=98\) """ if not re.match(ping_exp_result, ping_result): self.fail("Unexpected trace: %s" % (ping_result,)) -- 2.47.0