Message262369
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. |
|
Date |
User |
Action |
Args |
2016-03-24 17:22:20 | upendra-k14 | set | recipients:
+ upendra-k14, rhettinger, terry.reedy, paul.moore, ncoghlan, peter.otten, markroseman, Aivar.Annamaa, dstufft, Marcus.Smith, Saimadhav.Heblikar, erickhoo |
2016-03-24 17:22:20 | upendra-k14 | set | messageid: <1458840140.33.0.561763648086.issue23551@psf.upfronthosting.co.za> |
2016-03-24 17:22:20 | upendra-k14 | link | issue23551 messages |
2016-03-24 17:22:19 | upendra-k14 | create | |
|