Skip to content

Commit 9919968

Browse files
committed
fix: cleanup tests and fix a raw string test, enable more win32
Signed-off-by: Stephen Arnold <[email protected]>
1 parent 8fcfded commit 9919968

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
CIBW_ARCHS_LINUX: auto
4040
CIBW_ARCHS_MACOS: auto arm64
4141
CIBW_TEST_SKIP: "*_arm64 *universal2:arm64 *linux_i686"
42-
CIBW_ARCHS_WINDOWS: auto64
42+
CIBW_ARCHS_WINDOWS: auto
4343
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
4444
CIBW_MANYLINUX_I686_IMAGE: manylinux2010
4545
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-*

tests/re_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,9 @@
550550

551551
# lookbehind: split by : but not if it is escaped by -.
552552
('(?<!-):(.*?)(?<!-):', 'a:bc-:de:f', SUCCEED, 'g1', 'bc-:de' ),
553-
# escaping with \ as we know it
554-
(r'(?<!\\\):(.*?)(?<!\\\):', 'a:bc\\:de:f', SUCCEED, 'g1', 'bc\\:de' ),
553+
# escaping with \ as we know it => updated for py311+
554+
# by removing one backslash from each set of 3
555+
(r'(?<!\\):(.*?)(?<!\\):', 'a:bc\\:de:f', SUCCEED, 'g1', 'bc\\:de' ),
555556
# terminating with ' and escaping with ? as in edifact
556557
("(?<!\\?)'(.*?)(?<!\\?)'", "a'bc?'de'f", SUCCEED, 'g1', "bc?'de" ),
557558

tests/test_re.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
from __future__ import print_function
2-
try:
3-
from test.test_support import verbose
4-
except ImportError:
5-
from test.support import verbose
6-
import re2 as re
7-
from re import Scanner
2+
83
import os
94
import sys
105
import traceback
116
from weakref import proxy
7+
8+
import re2 as re
9+
from re import Scanner
10+
11+
try:
12+
from test import support
13+
from test.support import verbose
14+
except ImportError: # import error on Windows
15+
verbose = re.VERBOSE
16+
1217
if sys.version_info[0] > 2:
1318
unicode = str
1419
unichr = chr

0 commit comments

Comments
 (0)