def test_skeleton_pypi_arguments_work(testing_workdir): """ These checks whether skeleton executes without error when these options are specified on the command line AND whether the underlying functionality works as a regression test for: https://github.com/conda/conda-build/pull/1384 """ args = ['pypi', 'msumastro', '--pin-numpy'] main_skeleton.execute(args) assert os.path.isdir('msumastro') # Deliberately bypass metadata reading in conda build to get as # close to the "ground truth" as possible. with open(os.path.join('msumastro', 'meta.yaml')) as f: assert f.read().count('numpy x.x') == 2 args = [ 'pypi', 'photutils', '--version=0.2.2', '--setup-options=--offline' ] main_skeleton.execute(args) assert os.path.isdir('photutils') # Check that the setup option occurs in bld.bat and build.sh. m = api.render('photutils')[0][0] assert '--offline' in m.meta['build']['script'] assert m.version() == '0.2.2'
def test_skeleton_pypi_arguments_work(testing_workdir): """ These checks whether skeleton executes without error when these options are specified on the command line AND whether the underlying functionality works as a regression test for: https://github.com/conda/conda-build/pull/1384 """ args = ['pypi', 'msumastro', '--pin-numpy'] main_skeleton.execute(args) assert os.path.isdir('msumastro') # Deliberately bypass metadata reading in conda build to get as # close to the "ground truth" as possible. with open('msumastro/meta.yaml') as f: actual = yaml.load(f) assert 'numpy x.x' in actual['requirements']['run'] assert 'numpy x.x' in actual['requirements']['build'] args = [ 'pypi', 'photutils', '--version=0.2.2', '--setup-options=--offline' ] main_skeleton.execute(args) assert os.path.isdir('photutils') # Check that the setup option occurs in bld.bat and build.sh. for script in ['bld.bat', 'build.sh']: with open('photutils/{}'.format(script)) as f: content = f.read() assert '--offline' in content with open(os.path.join('photutils', 'meta.yaml')) as f: content = f.read() assert 'version: "0.2.2"' in content
def test_skeleton_pypi(testing_workdir, testing_config): args = ['pypi', 'peppercorn'] main_skeleton.execute(args) assert os.path.isdir('peppercorn') # ensure that recipe generated is buildable main_build.execute(('peppercorn', ))
def test_skeleton_pypi_arguments_work(testing_workdir, test_config): """ These checks whether skeleton executes without error when these options are specified on the command line AND whether the underlying functionality works as a regression test for: https://github.com/conda/conda-build/pull/1384 """ args = ['pypi', 'msumastro', '--pin-numpy'] main_skeleton.execute(args) assert os.path.isdir('msumastro') # Deliberately bypass metadata reading in conda build to get as # close to the "ground truth" as possible. with open('msumastro/meta.yaml') as f: actual = yaml.load(f) assert 'numpy x.x' in actual['requirements']['run'] assert 'numpy x.x' in actual['requirements']['build'] args = ['pypi', 'photutils', '--version=0.2.2', '--setup-options=--offline'] main_skeleton.execute(args) assert os.path.isdir('photutils') # Check that the setup option occurs in bld.bat and build.sh. for script in ['bld.bat', 'build.sh']: with open('photutils/{}'.format(script)) as f: content = f.read() assert '--offline' in content with open(os.path.join('photutils', 'meta.yaml')) as f: content = f.read() assert 'version: "0.2.2"' in content
def test_skeleton_pypi_arguments_work(testing_workdir): """ These checks whether skeleton executes without error when these options are specified on the command line AND whether the underlying functionality works as a regression test for: https://github.com/conda/conda-build/pull/1384 """ args = ['pypi', 'msumastro', '--pin-numpy'] main_skeleton.execute(args) assert os.path.isdir('msumastro') # Deliberately bypass metadata reading in conda build to get as # close to the "ground truth" as possible. with open(os.path.join('msumastro', 'meta.yaml')) as f: assert f.read().count('numpy x.x') == 2 args = ['pypi', 'photutils', '--version=0.2.2', '--setup-options=--offline'] main_skeleton.execute(args) assert os.path.isdir('photutils') # Check that the setup option occurs in bld.bat and build.sh. m = api.render('photutils')[0][0] assert '--offline' in m.meta['build']['script'] assert m.version() == '0.2.2'
def test_skeleton_pypi(testing_workdir, testing_config): args = ['pypi', 'peppercorn'] main_skeleton.execute(args) assert os.path.isdir('peppercorn') # ensure that recipe generated is buildable main_build.execute(('peppercorn',))
def test_skeleton_pypi(testing_workdir, testing_config): args = ['pypi', 'Click'] main_skeleton.execute(args) assert os.path.isdir('click') # ensure that recipe generated is buildable args = ['click', '--no-anaconda-upload', '--no-activate'] main_build.execute(args)
def test_skeleton_pypi(testing_workdir, test_config): args = ['pypi', 'click'] main_skeleton.execute(args) assert os.path.isdir('click') # ensure that recipe generated is buildable args = ['click', '--no-anaconda-upload', '--croot', test_config.croot, '--no-activate',] main_build.execute(args)
def test_skeleton_pypi(testing_workdir): args = ["pypi", "click"] main_skeleton.execute(args) assert os.path.isdir("click") # ensure that recipe generated is buildable args = ["click", "--no-anaconda-upload"] main_build.execute(args)
def test_skeleton_pypi(testing_workdir, testing_config, capfd): args = ['pypi', 'click'] main_skeleton.execute(args) assert os.path.isdir('click') # ensure that recipe generated is buildable args = ['click', '--no-anaconda-upload', '--croot', testing_config.croot, '--no-activate'] main_build.execute(args) output, error = capfd.readouterr() if hasattr(output, 'decode'): output = output.decode() assert 'Nothing to test for' not in output assert 'Nothing to test for' not in error
def test_skeleton_pypi(testing_workdir, testing_config, capfd): args = ['pypi', 'click'] main_skeleton.execute(args) assert os.path.isdir('click') # ensure that recipe generated is buildable args = [ 'click', '--no-anaconda-upload', '--croot', testing_config.croot, '--no-activate' ] main_build.execute(args) output, error = capfd.readouterr() if hasattr(output, 'decode'): output = output.decode() assert 'Nothing to test for' not in output assert 'Nothing to test for' not in error
def test_skeleton_pypi_compatible_versions(testing_workdir, testing_config): args = ['pypi', 'openshift'] main_skeleton.execute(args) assert os.path.isdir('openshift')