Skip to content

Commit 4dbd83c

Browse files
committed
Relax output validation for thread tests a bit
Python2 seems to insert spaces randomly after newlines. Checking for the string also avoids the regex trickery required for differing execution order when using threads
1 parent 535a7d3 commit 4dbd83c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

test/test_scorep.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,11 @@ def test_threads(scorep_env, instrumenter):
308308
env=scorep_env)
309309

310310
# assert std_err == "" TODO: Readd when issue #87 is resolved
311-
assert re.search(("hello world\n" +
312-
"(Thread 0 started\nThread 1 started\n|Thread 1 started\nThread 0 started\n)" +
313-
"(baz\nbar\n|bar\nbaz\n)"), std_out)
311+
assert "hello world\n" in std_out
312+
assert "Thread 0 started\n" in std_out
313+
assert "Thread 1 started\n" in std_out
314+
assert "bar\n" in std_out
315+
assert "baz\n" in std_out
314316

315317
std_out, std_err = call(["otf2-print", trace_path])
316318

0 commit comments

Comments
 (0)