Skip to content

Commit 186dd22

Browse files
committed
BuiltIn: Log argument types on DEBUG level not INFO. Fixes robotframework#2045.
1 parent 16e97ad commit 186dd22

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

atest/robot/standard_libraries/builtin/converter.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*** Settings ***
2-
Suite Setup Run Tests ${EMPTY} standard_libraries/builtin/converter.robot
2+
Suite Setup Run Tests --loglevel DEBUG standard_libraries/builtin/converter.robot
33
Force Tags regression
44
Default Tags jybot pybot
55
Resource atest_resource.robot
@@ -71,4 +71,4 @@ Create List
7171
*** Keywords ***
7272
Verify argument type message
7373
[Arguments] ${msg} ${type1}
74-
Check log message ${msg} Argument types are:\n<type '${type1}'>
74+
Check log message ${msg} Argument types are:\n<type '${type1}'> DEBUG

atest/robot/standard_libraries/builtin/verify.robot

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*** Settings ***
2-
Suite Setup Run Tests ${EMPTY} standard_libraries/builtin/verify.robot
2+
Suite Setup Run Tests --loglevel DEBUG standard_libraries/builtin/verify.robot
33
Force Tags regression
44
Default Tags jybot pybot
55
Resource atest_resource.robot
@@ -168,7 +168,8 @@ Length Should Be
168168
${tc} = Check Test Case ${TESTNAME}
169169
Check Log Message ${tc.kws[-1].msgs[0]} Length is 2
170170
Check Log Message ${tc.kws[-1].msgs[1]} Length of '*' should be 3 but is 2. FAIL pattern=yep
171-
Length Should Be ${tc.kws[-1].msgs} 2
171+
Check Log Message ${tc.kws[-1].msgs[2]} Traceback* DEBUG pattern=yep
172+
Length Should Be ${tc.kws[-1].msgs} 3
172173

173174
Length Should Be With Non Default Message
174175
Check Test Case ${TESTNAME}
@@ -249,7 +250,7 @@ Verify argument type message
249250
[Arguments] ${msg} ${type1} ${type2}
250251
${type1} = Str Type to Unicode On IronPython ${type1}
251252
${type2} = Str Type to Unicode On IronPython ${type2}
252-
Check log message ${msg} Argument types are:\n<type '${type1}'>\n<type '${type2}'>
253+
Check log message ${msg} Argument types are:\n<type '${type1}'>\n<type '${type2}'> DEBUG
253254

254255
Str Type to Unicode On IronPython
255256
[Arguments] ${type}

src/robot/libraries/BuiltIn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def _is_true(self, condition):
8585

8686
def _log_types(self, *args):
8787
msg = ["Argument types are:"] + [self._get_type(a) for a in args]
88-
self.log('\n'.join(msg))
88+
self.log('\n'.join(msg), 'DEBUG')
8989

9090
def _get_type(self, arg):
9191
# In IronPython type(u'x') is str. We want to report unicode anyway.

0 commit comments

Comments
 (0)