Skip to content

Ride does not display the correct default values for library keywords in usage #2134

Closed

Description

@moliveras

RobotFramework: 3.2b1
ride: 1.7.4.1
Python 2.7.5 on Centos 7

I have a library that has been imported into a test suite that is using some default values for arguments. When I try to get the usage in ride by either typing in the library name followed by CTRL or by entering in the keyword name in ride, hovering over it and select CTRL, the usage shows argument names as the default value rather than the actual default value. The function works correctly and does use the default values.

Here is a sample library that will exhibit the issue:
#! /usr/bin/env python
import time
import sys
import os
from robot.api import logger
from robot.libraries.BuiltIn import BuiltIn
from robot.libraries.OperatingSystem import OperatingSystem
from robot.api.deco import library

class test_library2:
ROBOT_LIBRARY_SCOPE = 'GLOBAL'
ROBOT_LIBRARY_VERSION = '3.1.2'

def function_1(self, arg1, arg2=3, arg3=None, arg4=True):
print "arg1: %s, arg2: %s, arg3: %s, arg4: %s" %(arg1, arg2, arg3, arg4)

See the attached png file, the usage does not show the correct default arguments

Activity

  1. moliveras commented on Feb 4, 2020

    @moliveras
    Author

    ride-default-args

  2. moliveras commented on Feb 4, 2020

    @moliveras
    Author

    The function prints out the arguments and they are shown correctly in the output:
    20200204 11:51:14.442 : INFO : arg1: test1, arg2: test2, arg3: None, arg4: True

  3. added
    bug
    on Feb 5, 2020
  4. added this to the v2.0 milestone on Mar 4, 2020
  5. HelioGuilherme66 commented on Mar 6, 2020

    @HelioGuilherme66
    Member

    Fixed by #2157

    @moliveras Very easy fix that you can apply on your python 2.7 installation.

  6. moliveras commented on Mar 9, 2020

    @moliveras
    Author

    Thank you @HelioGuilherme66 !

  7. added a commit that references this issue on Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions