|
2 | 2 |
|
3 | 3 | import pytest
|
4 | 4 |
|
5 |
| -from tests import helpers |
6 | 5 | from twine import commands
|
7 | 6 | from twine import exceptions
|
8 | 7 |
|
@@ -55,38 +54,39 @@ def test_find_dists_handles_real_files():
|
55 | 54 | def test_split_inputs():
|
56 | 55 | """Split inputs into dists, signatures, and attestations."""
|
57 | 56 | inputs = [
|
58 |
| - helpers.WHEEL_FIXTURE, |
59 |
| - helpers.WHEEL_FIXTURE + ".asc", |
60 |
| - helpers.WHEEL_FIXTURE + ".build.attestation", |
61 |
| - helpers.WHEEL_FIXTURE + ".publish.attestation", |
62 |
| - helpers.SDIST_FIXTURE, |
63 |
| - helpers.SDIST_FIXTURE + ".asc", |
64 |
| - helpers.NEW_WHEEL_FIXTURE, |
65 |
| - helpers.NEW_WHEEL_FIXTURE + ".frob.attestation", |
66 |
| - helpers.NEW_SDIST_FIXTURE, |
| 57 | + "dist/twine-1.5.0-py2.py3-none-any.whl", |
| 58 | + "dist/twine-1.5.0-py2.py3-none-any.whl.asc", |
| 59 | + "dist/twine-1.5.0-py2.py3-none-any.whl.build.attestation", |
| 60 | + "dist/twine-1.5.0-py2.py3-none-any.whl.build.publish.attestation", |
| 61 | + "dist/twine-1.5.0.tar.gz", |
| 62 | + "dist/twine-1.5.0.tar.gz.asc", |
| 63 | + "dist/twine-1.6.5-py2.py3-none-any.whl", |
| 64 | + "dist/twine-1.6.5-py2.py3-none-any.whl.frob.attestation", |
| 65 | + "dist/twine-1.6.5.tar.gz", |
67 | 66 | ]
|
68 | 67 |
|
69 | 68 | inputs = commands._split_inputs(inputs)
|
70 | 69 |
|
71 | 70 | assert inputs.dists == [
|
72 |
| - helpers.WHEEL_FIXTURE, |
73 |
| - helpers.SDIST_FIXTURE, |
74 |
| - helpers.NEW_WHEEL_FIXTURE, |
75 |
| - helpers.NEW_SDIST_FIXTURE, |
| 71 | + "dist/twine-1.5.0-py2.py3-none-any.whl", |
| 72 | + "dist/twine-1.5.0.tar.gz", |
| 73 | + "dist/twine-1.6.5-py2.py3-none-any.whl", |
| 74 | + "dist/twine-1.6.5.tar.gz", |
76 | 75 | ]
|
77 | 76 |
|
78 |
| - expected_signatures = { |
79 |
| - os.path.basename(dist) + ".asc": dist + ".asc" |
80 |
| - for dist in [helpers.WHEEL_FIXTURE, helpers.SDIST_FIXTURE] |
| 77 | + assert inputs.signatures == { |
| 78 | + "twine-1.5.0-py2.py3-none-any.whl.asc": "dist/twine-1.5.0-py2.py3-none-any.whl.asc", # noqa: E501 |
| 79 | + "twine-1.5.0.tar.gz.asc": "dist/twine-1.5.0.tar.gz.asc", |
81 | 80 | }
|
82 |
| - assert inputs.signatures == expected_signatures |
83 | 81 |
|
84 | 82 | assert inputs.attestations_by_dist == {
|
85 |
| - helpers.WHEEL_FIXTURE: [ |
86 |
| - helpers.WHEEL_FIXTURE + ".build.attestation", |
87 |
| - helpers.WHEEL_FIXTURE + ".publish.attestation", |
| 83 | + "dist/twine-1.5.0-py2.py3-none-any.whl": [ |
| 84 | + "dist/twine-1.5.0-py2.py3-none-any.whl.build.attestation", |
| 85 | + "dist/twine-1.5.0-py2.py3-none-any.whl.build.publish.attestation", |
88 | 86 | ],
|
89 |
| - helpers.SDIST_FIXTURE: [], |
90 |
| - helpers.NEW_WHEEL_FIXTURE: [helpers.NEW_WHEEL_FIXTURE + ".frob.attestation"], |
91 |
| - helpers.NEW_SDIST_FIXTURE: [], |
| 87 | + "dist/twine-1.5.0.tar.gz": [], |
| 88 | + "dist/twine-1.6.5-py2.py3-none-any.whl": [ |
| 89 | + "dist/twine-1.6.5-py2.py3-none-any.whl.frob.attestation", |
| 90 | + ], |
| 91 | + "dist/twine-1.6.5.tar.gz": [], |
92 | 92 | }
|
0 commit comments