From 9bfe411d4e5e02fa5fb9082fc112f7994d5a8bea Mon Sep 17 00:00:00 2001 From: jmlapre <110123055+jmlapre@users.noreply.github.com> Date: Tue, 19 Mar 2024 12:49:30 -0400 Subject: [PATCH] use raw strings with regex (#1060) Replace \= with /= inside string --- src/sst/core/testingframework/sst_unittest_support.py | 2 +- tests/test_UnitAlgebra.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sst/core/testingframework/sst_unittest_support.py b/src/sst/core/testingframework/sst_unittest_support.py index beb39a160..bcabdeef7 100644 --- a/src/sst/core/testingframework/sst_unittest_support.py +++ b/src/sst/core/testingframework/sst_unittest_support.py @@ -904,7 +904,7 @@ def testing_parse_stat(line): Returns: (list) list of [component, sum, sumSq, count, min, max] or 'None' if not a statistic """ - cons_accum = re.compile(' ([\w.]+)\.(\w+) : Accumulator : Sum.(\w+) = ([\d.]+); SumSQ.\w+ = ([\d.]+); Count.\w+ = ([\d.]+); Min.\w+ = ([\d.]+); Max.\w+ = ([\d.]+);') + cons_accum = re.compile(r' ([\w.]+)\.(\w+) : Accumulator : Sum.(\w+) = ([\d.]+); SumSQ.\w+ = ([\d.]+); Count.\w+ = ([\d.]+); Min.\w+ = ([\d.]+); Max.\w+ = ([\d.]+);') m = cons_accum.match(line) if m == None: return None diff --git a/tests/test_UnitAlgebra.py b/tests/test_UnitAlgebra.py index 8440020f8..c9e279b53 100644 --- a/tests/test_UnitAlgebra.py +++ b/tests/test_UnitAlgebra.py @@ -96,7 +96,7 @@ ua3_id_before = id(ua3) ua3 /= ua2 if id(ua3) == ua3_id_before: - print("ERROR: \= operator returned the same object") + print("ERROR: /= operator returned the same object") print(ua3.bestSI()) print(ua4.bestSI())