-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
When running the test suit, all calls to test_run_setup_py_from_dir fail:
[ 14s] _ TestMetaExtract.test_run_setup_py_from_dir[setuptools_simple-expected_data0] _
[ 14s]
[ 14s] self = <metaextract.tests.test_metaextract.TestMetaExtract object at 0x7f5c1b2a1db0>
[ 14s] tmpdir = local('/tmp/pytest-of-abuild/pytest-0/test_run_setup_py_from_dir_set0')
[ 14s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f5c1b2c1b70>
[ 14s] fixture_name = 'setuptools_simple'
[ 14s] expected_data = {'data_files': None, 'entry_points': None, 'extras_require': {'extra1': ['pkg1']}, 'has_ext_modules': None, ...}
[ 14s]
[ 14s] @pytest.mark.parametrize("fixture_name,expected_data", [
[ 14s] (
[ 14s] "setuptools_simple", {
[ 14s] 'entry_points': None, 'extras_require': {'extra1': ['pkg1']},
[ 14s] 'install_requires': ['bar', 'foo'], 'python_requires': None,
[ 14s] 'setup_requires': [], 'has_ext_modules': None,
[ 14s] 'scripts': None, 'data_files': None, 'tests_require': None}
[ 14s] ),
[ 14s] (
[ 14s] "setuptools_simple_unicode", {
[ 14s] 'entry_points': None, 'extras_require': {
[ 14s] 'extra1': ['pkg1'], 'extra2': ['pkg2', 'pkg3']},
[ 14s] 'install_requires': ['bar', 'foo'], 'python_requires': None,
[ 14s] 'setup_requires': [], 'has_ext_modules': None,
[ 14s] 'scripts': None, 'data_files': None, 'tests_require': None}
[ 14s] ),
[ 14s] (
[ 14s] "setuptools_simple_unicode_and_header", {
[ 14s] 'entry_points': None, 'extras_require': {},
[ 14s] 'install_requires': ['bar', 'foo'], 'python_requires': None,
[ 14s] 'setup_requires': [], 'has_ext_modules': None,
[ 14s] 'scripts': None, 'data_files': None, 'tests_require': None}
[ 14s] ),
[ 14s] (
[ 14s] "setuptools_full", {
[ 14s] 'install_requires': ['bar', 'foo'], 'setup_requires': [],
[ 14s] 'python_requires': '>=2.6,!=3.0.*,!=3.1.*,!=3.2.*',
[ 14s] 'has_ext_modules': None, 'scripts': ['scripts/testpkg'],
[ 14s] 'data_files': [
[ 14s] ['man/man1', ['doc/testpkg.1']],
[ 14s] ['share/doc/testpgk',
[ 14s] ['AUTHORS', 'LICENSE', 'README.rst']],
[ 14s] ['share/doc/testpkg/html', ['doc/testpkg.html']],
[ 14s] ], 'tests_require': ['testpkg1'], 'entry_points':
[ 14s] {
[ 14s] 'console_scripts': ['testpkgp1=testpkg:main']
[ 14s] },
[ 14s] 'extras_require': {
[ 14s] 'extra1': ['ex11', 'ex12'],
[ 14s] 'extra2': ['ex21>=3.4', 'ex22!=0.15.0,>=0.11.0']
[ 14s] },
[ 14s] 'version': '1.2.3',
[ 14s] 'name': 'testpkg',
[ 14s] 'fullname': 'testpkg-1.2.3',
[ 14s] 'description': 'desc',
[ 14s] 'long_description': 'long desc',
[ 14s] 'classifiers': ['Intended Audience :: Developers'],
[ 14s] 'license': 'Apache-2.0',
[ 14s]
[ 14s] }
[ 14s] ),
[ 14s] (
[ 14s] "distutils_simple",
[ 14s] {'data_files': None, 'has_ext_modules': None, 'scripts': None,
[ 14s] 'version': '1.0'}
[ 14s] ),
[ 14s] (
[ 14s] "distutils_with_extension",
[ 14s] {'data_files': None, 'has_ext_modules': True, 'scripts': None}
[ 14s] ),
[ 14s] (
[ 14s] "pbr_simple",
[ 14s] {'entry_points': {'console_scripts': ['entry2 = pkg1:main']},
[ 14s] 'extras_require': {}, 'install_requires': [],
[ 14s] 'python_requires': None, 'setup_requires': ['pbr>=1.0'],
[ 14s] 'has_ext_modules': None, 'scripts': None, 'data_files': None,
[ 14s] 'tests_require': None,
[ 14s] 'version': '1'}
[ 14s] ),
[ 14s] (
[ 14s] "pyproject",
[ 14s] {
[ 14s] 'install_requires': ['bar', 'foo'], 'setup_requires': [],
[ 14s] 'python_requires': '!=3.0.*,!=3.1.*,!=3.2.*,>=2.6',
[ 14s] 'entry_points':
[ 14s] {
[ 14s] 'console_scripts': ['testpkgp1 = testpkg:main']
[ 14s] },
[ 14s] 'extras_require': {
[ 14s] 'extra1': ['ex11', 'ex12'],
[ 14s] 'extra2': ['ex21>=3.4', 'ex22!=0.15.0,>=0.11.0']
[ 14s] },
[ 14s] 'version': '1.2.3',
[ 14s] 'name': 'testpkg',
[ 14s] 'fullname': 'testpkg-1.2.3',
[ 14s] 'description': 'desc',
[ 14s] 'long_description': 'long desc\n',
[ 14s] 'classifiers': ['Intended Audience :: Developers'],
[ 14s] 'license': 'Apache-2.0',
[ 14s] }
[ 14s] ),
[ 14s] ])
[ 14s] def test_run_setup_py_from_dir(self, tmpdir, monkeypatch,
[ 14s] fixture_name, expected_data):
[ 14s] if fixture_name == "pyproject" and sys.version_info < (3, 0):
[ 14s] pytest.skip("pyproject.toml is not supported for python2")
[ 14s]
[ 14s] # the given fixture name is the directory name in the tests/fixtures
[ 14s] # dir. copy that fixtures dir to a temp dir and run _setup_py_from_dir
[ 14s] # PBR_VERSION is needed for the PBR tests because the fixture are not
[ 14s] # containing a git repo
[ 14s] monkeypatch.setenv("PBR_VERSION", "1")
[ 14s] fixture_dir = os.path.join(fixtures_base_dir, fixture_name)
[ 14s] dest_dir = os.path.join(tmpdir.strpath, fixture_name)
[ 14s] shutil.copytree(fixture_dir, dest_dir)
[ 14s] data = meta_utils._setup_py_run_from_dir(dest_dir, sys.executable)
[ 14s] for expected_key, expected_val in expected_data.items():
[ 14s] > assert expected_key in data['data']
[ 14s] E AssertionError: assert 'tests_require' in {'author': None, 'author_email': None, 'classifiers': [], 'contact': None, ...}
[ 14s]
[ 14s] metaextract/tests/test_metaextract.py:251: AssertionError
Complete build log with the list of all packages used and steps taken to reproduce.
Metadata
Metadata
Assignees
Labels
No labels