X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=tests%2Fplugins%2Fsrc.ctf.fs%2Fquery%2Ftest_query_trace_info.py;fp=tests%2Fplugins%2Fsrc.ctf.fs%2Fquery%2Ftest_query_trace_info.py;h=e0e716b21b73a2fda3b9392bd8d4fb18ab0e2818;hb=b00e2e76283d6116ec75b130ef1e6c9252593e2f;hp=ff8264a349fba1d32ae7edcd3c0620124db9839e;hpb=f1083338b127f62400f8c71608aa51be97cd8ff9;p=babeltrace.git diff --git a/tests/plugins/src.ctf.fs/query/test_query_trace_info.py b/tests/plugins/src.ctf.fs/query/test_query_trace_info.py index ff8264a3..e0e716b2 100644 --- a/tests/plugins/src.ctf.fs/query/test_query_trace_info.py +++ b/tests/plugins/src.ctf.fs/query/test_query_trace_info.py @@ -18,7 +18,6 @@ import unittest import bt2 import os import re -from pathlib import PureWindowsPath, PurePosixPath test_ctf_traces_path = os.environ['BT_CTF_TRACES_PATH'] @@ -145,11 +144,12 @@ class QueryTraceInfoPortNameTestCase(unittest.TestCase): }, ).query() - os_stream_path = PurePosixPath( - '/tests/data/ctf-traces/intersection/3eventsintersect/' - ) if os.environ['BT_OS_TYPE'] == 'mingw': - os_stream_path = PureWindowsPath(os_stream_path) + os_stream_path = ( + '\\tests\\data\\ctf-traces\\intersection\\3eventsintersect\\' + ) + else: + os_stream_path = '/tests/data/ctf-traces/intersection/3eventsintersect/' self.assertEqual(len(res), 1) trace = res[0] @@ -158,13 +158,13 @@ class QueryTraceInfoPortNameTestCase(unittest.TestCase): self.assertRegex( str(streams[0]["port-name"]), r"^7afe8fbe-79b8-4f6a-bbc7-d0c782e7ddaf \| 0 \| .*" - + re.escape(str(os_stream_path / "test_stream_0")) + + re.escape(os_stream_path + "test_stream_0") + r"$", ) self.assertRegex( str(streams[1]["port-name"]), r"^7afe8fbe-79b8-4f6a-bbc7-d0c782e7ddaf \| 0 \| .*" - + re.escape(str(os_stream_path / "test_stream_1")) + + re.escape(os_stream_path + "test_stream_1") + r"$", ) @@ -175,11 +175,10 @@ class QueryTraceInfoPortNameTestCase(unittest.TestCase): {"inputs": [os.path.join(test_ctf_traces_path, "succeed", "succeed1")]}, ).query() - os_stream_path = PurePosixPath( - '/tests/data/ctf-traces/succeed/succeed1/dummystream' - ) if os.environ['BT_OS_TYPE'] == 'mingw': - os_stream_path = PureWindowsPath(os_stream_path) + os_stream_path = '\\tests\\data\\ctf-traces\\succeed\\succeed1\\dummystream' + else: + os_stream_path = '/tests/data/ctf-traces/succeed/succeed1/dummystream' self.assertEqual(len(res), 1) trace = res[0] @@ -188,7 +187,7 @@ class QueryTraceInfoPortNameTestCase(unittest.TestCase): self.assertRegex( str(streams[0]["port-name"]), r"^2a6422d0-6cee-11e0-8c08-cb07d7b3a564 \| .*" - + re.escape(str(os_stream_path)) + + re.escape(os_stream_path) + r"$", )