Skip to content

Commit e2f8c19

Browse files
committed
fixed regex for real
1 parent afd76e7 commit e2f8c19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/integration/test_pymas.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def test_from_pickle(train_data, pickle_file):
140140
if rc then do;
141141
rc = py.appendSrcLine('try:');
142142
rc = py.appendSrcLine(' import pickle, base64');
143-
rc = py.appendSrcLine(' bytes = b"X"');
143+
rc = py.appendSrcLine(' bytes = "X"');
144144
rc = py.appendSrcLine(' obj = pickle.loads(base64.b64decode(bytes))');
145145
rc = py.appendSrcLine(' _compile_error = None');
146146
rc = py.appendSrcLine('except Exception as e:');
@@ -196,7 +196,7 @@ def test_from_pickle(train_data, pickle_file):
196196

197197
# Ignore byte string during comparison. Pickle seems to change with
198198
# time / Python versions
199-
result = re.sub('bytes = b"[\w\d/\+\=]+"', 'bytes = b"X"', result)
199+
result = re.sub('bytes = .*', 'bytes = "X"\');', result)
200200
assert result == target.lstrip('\n')
201201

202202

0 commit comments

Comments
 (0)