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 <[email protected]>
<http://bugs.python.org/issue23551>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com