[issue23551] IDLE to provide menu link to PIP gui.

Upendra Kumar report at bugs.python.org
Thu Mar 24 13:22:20 EDT 2016


Upendra Kumar added the comment:

Here, I have one doubt regarding the get_data function that should the get_data function be a common function for different features for example : 

def _get_data(self, func_option):
        """
        A separate function for extracting data from the runpip() function.
        It is done in order to get this function tested using unittest module

        According to func_option, it returns the data extracted :

        Options:
        -------
        1. list : for listing all currently installed packages
        2. show <package name> : show details of installed packages
        3. search <keyword> : show formated search results
        4. install <package name> : get results while installing packages
        """

        splitted_options = func_option.split()

        if splitted_options[0] == 'list':
            return runpip(func_option)

        elif splitted_options[0] == 'show':
            return runpip(func_option)

        elif splitted_options[0] == 'search':
            return runpip(func_option)

        elif splitted_options[0] == 'install':
            return runpip(func_option)

I am not clear would this single function for retrieving data would be good for uniitest or different functions would be good for retrieving data.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23551>
_______________________________________


More information about the Python-bugs-list mailing list