@@ -0,0 +1,1339 @@
+import os%0Aimport sys%0Aimport logging%0Aimport tempfile%0A%0Afrom msl.package_manager import utils%0A%0Afile_logger = None%0A%0A%0Adef create_file_logger():%0A    global file_logger%0A%0A    if file_logger is not None:%0A        return file_logger%0A%0A    file_logger = logging.FileHandler(%0A        filename=os.path.join(tempfile.gettempdir(), 'msl-package-manager-testing.log'),%0A        mode='w',%0A    )%0A    file_logger.setLevel(logging.DEBUG)%0A    file_logger.setFormatter(logging.Formatter('%25(message)s'))%0A    utils.log.addHandler(file_logger)%0A%0A    return file_logger%0A%0A%0Adef read_file_logger():%0A    file_logger.close()%0A    with open(file_logger.baseFilename, 'rt') as fp:%0A        lines = fp.readlines()%0A    return lines%0A%0A%0Adef setup_module(module):%0A    utils.set_log_level(logging.DEBUG)%0A    create_file_logger()%0A%0A%0Adef teardown_module(module):%0A    global file_logger%0A    file_logger.close()%0A    os.remove(file_logger.baseFilename)%0A    file_logger = None%0A%0A%0Adef test_show_packages():%0A%0A    utils.show_packages()%0A    lines = read_file_logger()%0A    assert os.path.dirname(sys.executable) in lines%5B0%5D%0A%0A    utils.show_packages(from_github=True)%0A    lines = read_file_logger()%0A    assert 'cached' in lines%5B0%5D%0A    assert 'GitHub' in lines%5B0%5D%0A%0A    utils.show_packages(from_pypi=True)%0A    lines = read_file_logger()%0A    assert 'cached' in lines%5B0%5D%0A    assert 'PyPI' in lines%5B0%5D%0A%0A%0A

add tests for showing package/repo info