Support multiple vendor files in pythonbundles.py
Not bumping the release, will happily wait until it bubbles trough.
This commit is contained in:
parent
04ae9b96f2
commit
9bd2a43a74
5 changed files with 53 additions and 21 deletions
|
|
@ -0,0 +1,5 @@
|
|||
Provides: bundled(python3dist(appdirs)) = 1.4.3
|
||||
Provides: bundled(python3dist(ordered-set)) = 3.1.1
|
||||
Provides: bundled(python3dist(packaging)) = 16.8
|
||||
Provides: bundled(python3dist(pyparsing)) = 2.2.1
|
||||
Provides: bundled(python3dist(six)) = 1.10
|
||||
3
tests/data/scripts_pythonbundles/setuptools.in
Normal file
3
tests/data/scripts_pythonbundles/setuptools.in
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
packaging==16.8
|
||||
pyparsing==2.2.1
|
||||
ordered-set==3.1.1
|
||||
3
tests/data/scripts_pythonbundles/setuptools.out
Normal file
3
tests/data/scripts_pythonbundles/setuptools.out
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Provides: bundled(python3dist(ordered-set)) = 3.1.1
|
||||
Provides: bundled(python3dist(packaging)) = 16.8
|
||||
Provides: bundled(python3dist(pyparsing)) = 2.2.1
|
||||
|
|
@ -34,7 +34,7 @@ def run_pythonbundles(*args, success=True):
|
|||
return cp
|
||||
|
||||
|
||||
projects = pytest.mark.parametrize('project', ('pkg_resources', 'pip', 'pipenv'))
|
||||
projects = pytest.mark.parametrize('project', ('pkg_resources', 'pip', 'pipenv', 'setuptools'))
|
||||
|
||||
|
||||
@projects
|
||||
|
|
@ -97,3 +97,23 @@ def test_compare_with_unexpected(project):
|
|||
cp = run_pythonbundles(TEST_DATA / f'{project}.in', '--compare-with', longer, success=False)
|
||||
assert cp.stdout == '', cp.stdout
|
||||
assert cp.stderr == f'Redundant unexpected provides:\n + {unexpected}\n', cp.stderr
|
||||
|
||||
|
||||
combo_order = pytest.mark.parametrize('projects', ['pkg_resources-setuptools', 'setuptools-pkg_resources'])
|
||||
|
||||
|
||||
@combo_order
|
||||
def test_multiple_vendor_files_output(projects):
|
||||
cp = run_pythonbundles(*(TEST_DATA / f'{p}.in' for p in projects.split('-')))
|
||||
expected = (TEST_DATA / 'pkg_resources_setuptools.out').read_text()
|
||||
assert cp.stdout == expected, cp.stdout
|
||||
assert cp.stderr == '', cp.stderr
|
||||
|
||||
|
||||
@combo_order
|
||||
def test_multiple_vendor_files_compare_with(projects):
|
||||
expected = (TEST_DATA / 'pkg_resources_setuptools.out').read_text()
|
||||
cp = run_pythonbundles(*(TEST_DATA / f'{p}.in' for p in projects.split('-')),
|
||||
'--compare-with', expected)
|
||||
assert cp.stdout == '', cp.stdout
|
||||
assert cp.stderr == '', cp.stderr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue