Mark multiple extras as not supported yet

This commit is contained in:
Petr Viktorin 2019-07-18 11:00:23 +02:00
parent d6e6bb7dfb
commit aca2f6a0c4
3 changed files with 35 additions and 2 deletions

View File

@ -212,8 +212,10 @@ def main(argv):
) )
parser.add_argument( parser.add_argument(
'-x', '--extras', metavar='EXTRAS', default='', '-x', '--extras', metavar='EXTRAS', default='',
help='comma separated list of "extras" for runtime requirements ' help='extra for runtime requirements (e.g. -x testing)',
+ '(e.g. -x testing,feature-x)', # XXX: a comma-separated list should be possible here
#help='comma separated list of "extras" for runtime requirements '
# + '(e.g. -x testing,feature-x)',
) )
args = parser.parse_args(argv) args = parser.parse_args(argv)

View File

@ -19,6 +19,9 @@ def test_data(case_name, capsys, tmp_path, monkeypatch):
cwd.mkdir() cwd.mkdir()
monkeypatch.chdir(cwd) monkeypatch.chdir(cwd)
if case.get('xfail'):
pytest.xfail(case.get('xfail'))
if 'pyproject.toml' in case: if 'pyproject.toml' in case:
cwd.joinpath('pyproject.toml').write_text(case['pyproject.toml']) cwd.joinpath('pyproject.toml').write_text(case['pyproject.toml'])

View File

@ -224,3 +224,31 @@ Run dependencies with extras (selected):
python3dist(nose) python3dist(nose)
python3dist(requests) python3dist(requests)
result: 0 result: 0
Run dependencies with multiple extras:
xfail: requirement.marker.evaluate seems to not support multiple extras
freeze_output: |
setuptools==50
wheel==1
pyyaml==1
include_runtime: true
extras: testing,more-testing, even-more-testing , cool-feature
setup.py: |
from setuptools import setup
setup(
extras_require={
'testing': ['dep1'],
'more-testing': ['dep2'],
'even-more-testing': ['dep3'],
'cool-feature': ['dep4'],
},
)
expected: |
python3dist(setuptools) >= 40.8
python3dist(wheel)
python3dist(wheel)
python3dist(dep1)
python3dist(dep2)
python3dist(dep3)
python3dist(dep4)
result: 0