def test_get_default_save_path_eval_success(self): if rpm: flexmock(rpm).should_receive('expandMacro').once().and_return( 'foo') else: flexmock(utils).should_receive('rpm_eval').once().and_return('foo') assert utils.get_default_save_path() == 'foo'
from pyp2rpm import utils DEFAULT_TEMPLATE = 'fedora' DEFAULT_PYTHON_VERSIONS = { 'fedora': ['3', '2'], 'epel7': ['2', '3'], 'epel6': ['2'], 'mageia': ['2', '3'], 'pld': ['2', '3'] } DEFAULT_PYTHON_VERSION = DEFAULT_PYTHON_VERSIONS[DEFAULT_TEMPLATE][0] DEFAULT_PKG_SOURCE = 'pypi' DEFAULT_METADATA_SOURCE = 'pypi' DEFAULT_DISTRO = 'fedora' DEFAULT_PKG_SAVE_PATH = utils.get_default_save_path() KNOWN_DISTROS = DEFAULT_PYTHON_VERSIONS.keys() ARCHIVE_SUFFIXES = ['.tar', '.tgz', '.tar.gz', '.tar.bz2', '.gz', '.bz2', '.xz', '.zip', '.egg', '.whl'] EXTENSION_SUFFIXES = ['.c', '.cpp'] MODULE_SUFFIXES = ('.py', '.pyc') DOC_FILES_RE = [r'readme.+', r'licens.+', r'copying.+'] LICENSE_FILES = ['license', 'copyright', 'copying'] SPHINX_DIR_RE = r'[^/]+/doc.?' PYPI_URL = 'https://pypi.org/pypi' PYPI_USABLE_DATA = ['description', 'summary', 'license', 'home_page', 'requires'] PYTHON_INTERPRETER = '/usr/bin/python' EXTRACT_DIST_COMMAND_ARGS = ['--quiet', '--command-packages', 'pyp2rpm.command', 'extract_dist'] TROVE_LICENSES = {