From f8d8ed094659f24d3a4a96d9eae32997148d23bc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 27 Mar 2024 17:52:13 -0400 Subject: [PATCH] use correct character class escapes --- unittest/force-styles/check_tests.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/unittest/force-styles/check_tests.py b/unittest/force-styles/check_tests.py index df71640789..4dba8f9b9e 100755 --- a/unittest/force-styles/check_tests.py +++ b/unittest/force-styles/check_tests.py @@ -54,7 +54,7 @@ improper = {} kspace = {} pair = {} -style_pattern = re.compile("(.+)Style\((.+),(.+)\)") +style_pattern = re.compile("(.+)Style\\((.+),(.+)\\)") upper = re.compile("[A-Z]+") gpu = re.compile("(.+)/gpu$") intel = re.compile("(.+)/intel$") @@ -176,19 +176,19 @@ def check_tests(name,styles,yaml,search,skip=()): counter = 0 counter += check_tests('pair',pair,'*-pair-*.yaml', - '.*pair_style:\s*((\S+).*)?',skip=('meam','lj/sf')) + '.*pair_style:\\s*((\\S+).*)?',skip=('meam','lj/sf')) counter += check_tests('bond',bond,'bond-*.yaml', - '.*bond_style:\s*((\S+).*)?') + '.*bond_style:\\s*((\\S+).*)?') counter += check_tests('angle',angle,'angle-*.yaml', - '.*angle_style:\s*((\S+).*)?') + '.*angle_style:\\s*((\\S+).*)?') counter += check_tests('dihedral',dihedral,'dihedral-*.yaml', - '.*dihedral_style:\s*((\S+).*)?') + '.*dihedral_style:\\s*((\\S+).*)?') counter += check_tests('improper',improper,'improper-*.yaml', - '.*improper_style:\s*((\S+).*)?') + '.*improper_style:\\s*((\\S+).*)?') counter += check_tests('kspace',kspace,'kspace-*.yaml', - '.*kspace_style\s*((\S+).*)?') + '.*kspace_style\\s*((\\S+).*)?') counter += check_tests('fix',fix,'fix-*.yaml', - ' fix\s+((\S+)\s*)?') + ' fix\\s+((\\S+)\\s*)?') total = len(pair)+len(bond)+len(angle)+len(dihedral)+len(improper)+len(kspace)+len(fix) print(f"\nTotal tests missing: {counter} of {total}")