This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author upendra-k14
Recipients Aivar.Annamaa, Marcus.Smith, Saimadhav.Heblikar, dstufft, erickhoo, markroseman, ncoghlan, paul.moore, peter.otten, rhettinger, terry.reedy, upendra-k14
Date 2016-03-24.17:22:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1458840140.33.0.561763648086.issue23551@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-03-24 17:22:20upendra-k14setrecipients: + upendra-k14, rhettinger, terry.reedy, paul.moore, ncoghlan, peter.otten, markroseman, Aivar.Annamaa, dstufft, Marcus.Smith, Saimadhav.Heblikar, erickhoo
2016-03-24 17:22:20upendra-k14setmessageid: <1458840140.33.0.561763648086.issue23551@psf.upfronthosting.co.za>
2016-03-24 17:22:20upendra-k14linkissue23551 messages
2016-03-24 17:22:19upendra-k14create