Exemple #1
0
def test_metapackage_build_number(test_config, testing_workdir):
    """the metapackage command creates a package with runtime dependencies specified on the CLI"""
    args = ['metapackage_test', '1.0', '-d', 'bzip2', '--build-number', '1']
    main_metapackage.execute(args)
    test_path = os.path.join(sys.prefix, "conda-bld", test_config.subdir,
                             'metapackage_test-1.0-1.tar.bz2')
    assert os.path.isfile(test_path)
Exemple #2
0
def test_metapackage(testing_config, testing_workdir):
    """the metapackage command creates a package with runtime dependencies specified on the CLI"""
    args = ['metapackage_test', '1.0', '-d', 'bzip2', '--no-anaconda-upload']
    main_metapackage.execute(args)
    test_path = glob(os.path.join(sys.prefix, "conda-bld", testing_config.host_subdir,
                             'metapackage_test-1.0-0.tar.bz2'))[0]
    assert os.path.isfile(test_path)
Exemple #3
0
def test_metapackage_build_string(test_config, testing_workdir):
    """the metapackage command creates a package with runtime dependencies specified on the CLI"""
    args = ['metapackage_test_build_string', '1.0', '-d', 'bzip2', '--build-string', 'frank']
    main_metapackage.execute(args)
    test_path = os.path.join(sys.prefix, "conda-bld", test_config.subdir,
                             'metapackage_test_build_string-1.0-frank.tar.bz2')
    assert os.path.isfile(test_path)
Exemple #4
0
def test_metapackage(testing_config, testing_workdir):
    """the metapackage command creates a package with runtime dependencies specified on the CLI"""
    args = ['metapackage_test', '1.0', '-d', 'bzip2', '--no-anaconda-upload']
    main_metapackage.execute(args)
    test_path = glob(os.path.join(sys.prefix, "conda-bld", testing_config.host_subdir,
                             'metapackage_test-1.0*_0.tar.bz2'))[0]
    assert os.path.isfile(test_path)
Exemple #5
0
def test_metapackage_metadata(test_config, testing_workdir):
    args = ['metapackage_test', '1.0', '-d', 'bzip2', "--home", "http://abc.com", "--summary", "wee",
            "--license", "BSD"]
    main_metapackage.execute(args)
    test_path = os.path.join(sys.prefix, "conda-bld", test_config.subdir, 'metapackage_test-1.0-0.tar.bz2')
    assert os.path.isfile(test_path)
    info = json.loads(package_has_file(test_path, 'info/index.json').decode('utf-8'))
    assert info['license'] == 'BSD'
    info = json.loads(package_has_file(test_path, 'info/about.json').decode('utf-8'))
    assert info['home'] == 'http://abc.com'
    assert info['summary'] == 'wee'
Exemple #6
0
def test_metapackage_metadata(testing_config, testing_workdir):
    args = ['metapackage_testing_metadata', '1.0', '-d', 'bzip2', "--home", "http://abc.com",
            "--summary", "wee", "--license", "BSD", '--no-anaconda-upload']
    main_metapackage.execute(args)

    test_path = glob(os.path.join(sys.prefix, "conda-bld", testing_config.host_subdir,
                             'metapackage_testing_metadata-1.0-0.tar.bz2'))[0]
    assert os.path.isfile(test_path)
    info = json.loads(package_has_file(test_path, 'info/index.json').decode('utf-8'))
    assert info['license'] == 'BSD'
    info = json.loads(package_has_file(test_path, 'info/about.json').decode('utf-8'))
    assert info['home'] == 'http://abc.com'
    assert info['summary'] == 'wee'
Exemple #7
0
def test_metapackage_metadata(test_config, testing_workdir):
    args = [
        "metapackage_test",
        "1.0",
        "-d",
        "bzip2",
        "--home",
        "http://abc.com",
        "--summary",
        "wee",
        "--license",
        "BSD",
    ]
    main_metapackage.execute(args)
    test_path = os.path.join(sys.prefix, "conda-bld", test_config.subdir, "metapackage_test-1.0-0.tar.bz2")
    assert os.path.isfile(test_path)
    info = json.loads(package_has_file(test_path, "info/index.json").decode("utf-8"))
    assert info["license"] == "BSD"
    info = json.loads(package_has_file(test_path, "info/about.json").decode("utf-8"))
    assert info["home"] == "http://abc.com"
    assert info["summary"] == "wee"
Exemple #8
0
def test_metapackage_build_string(test_config, testing_workdir):
    """the metapackage command creates a package with runtime dependencies specified on the CLI"""
    args = ["metapackage_test", "1.0", "-d", "bzip2", "--build-string", "frank"]
    main_metapackage.execute(args)
    test_path = os.path.join(sys.prefix, "conda-bld", test_config.subdir, "metapackage_test-1.0-frank.tar.bz2")
    assert os.path.isfile(test_path)