Skip to content

Commit 180ad1b

Browse files
committed
Use os.path.sep instead of condition
Signed-off-by: Gregory Shimansky <[email protected]>
1 parent 85685a8 commit 180ad1b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

python/test/unit/language/test_compile_errors.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import triton.language as tl
88
from triton.compiler.errors import CompilationError, CompileTimeAssertionFailure
99
import traceback
10-
import platform
1110

1211

1312
def is_interpreter():
@@ -155,8 +154,7 @@ def kernel():
155154
try:
156155
inner = e.value.__cause__
157156
outer = e.value
158-
target = "\\core.py" if platform.system() == 'Windows' else "/core.py"
159-
assert target in '\n'.join(traceback.format_tb(inner.__traceback__)), "error should point inside core.py"
157+
assert os.path.sep + "core.py" in '\n'.join(traceback.format_tb(inner.__traceback__)), "error should point inside core.py"
160158

161159
assert "at 2:4:" in str(outer), "error should point to expand_dims call"
162160
assert "<source unavailable>" not in str(outer)

0 commit comments

Comments
 (0)