Skip to content

Commit 8cababe

Browse files
committed
Fix Jython only unit test broken due to robotframework#1835.
Nowadays keyword handlers are stored in test library using their "printable name" (e.g. `Get Name`) and not the original name got from the library (e.g. `getName`). Also whitespace cleanup in used test library.
1 parent 4274448 commit 8cababe

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

atest/testresources/testlibs/OverrideGetName.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
public class OverrideGetName {
22

3-
// Overrides the default getName class method, which causes TypeError
3+
// Overrides the default getName class method, which causes TypeError
44
// when OverrideGetName.getName() is called on Jython.
55
public String getName() {
6-
return "xxx";
6+
return "xxx";
77
}
88

99
public void doNothing() {

utest/api/test_deco.py

Whitespace-only changes.

utest/running/test_testlibrary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def test_get_java_handlers(self):
436436

437437
def test_overridden_getName(self):
438438
handlers = TestLibrary('OverrideGetName').handlers
439-
assert_equals(sorted(handlers.keys()), ['doNothing', 'getName'])
439+
assert_equals(sorted(handlers.keys()), ['Do Nothing', 'Get Name'])
440440

441441
def test_extending_java_lib_in_python(self):
442442
handlers = TestLibrary('extendingjava.ExtendJavaLib').handlers

0 commit comments

Comments
 (0)