Skip to content

Commit 4e9c1a0

Browse files
committed
merge master
2 parents d4bea6e + 3e8d7a1 commit 4e9c1a0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/flow/includes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@
3232
MAX_TRANSACTIONS=100
3333

3434

35-
# returns the test name and line number from which a helper function within this file was called
35+
# returns the test name and line number from which a helper function within this file was called.
36+
# For example, if an assertion fails in check_error_message function, and the caller function to check_error_message
37+
# is in tests_onnx.py line 25, this should return: "tests_onnx:py:25"
3638
def get_caller_pos():
37-
return "{}:{}".format(sys._getframe(2).f_code.co_name, sys._getframe(2).f_lineno)
39+
return f'{sys._getframe(2).f_code.co_filename.split("/")[-1]}:{sys._getframe(2).f_lineno}'
3840

3941
def ensureSlaveSynced(con, env, timeout_ms=0):
4042
if env.useSlaves:

0 commit comments

Comments
 (0)