Skip to content

Commit 998518f

Browse files
committed
Do not reuse the same test file across tests
Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent 648b17b commit 998518f

File tree

4 files changed

+166
-7
lines changed

4 files changed

+166
-7
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"headers": {
3+
"tool_name": "python-inspector",
4+
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
5+
"options": [
6+
"--index-url https://pypi.org/simple",
7+
"--index-url https://thirdparty.aboutcode.org/pypi/simple/",
8+
"--json <file>",
9+
"--operating-system linux",
10+
"--python-version 38",
11+
"--specifier zipp~=3.8.0"
12+
],
13+
"notice": "Dependency tree generated with python-inspector.\npython-inspector is a free software tool from nexB Inc. and others.\nVisit https://github.com/aboutcode-org/python-inspector/ for support and download.",
14+
"warnings": [],
15+
"errors": []
16+
},
17+
"files": [],
18+
"packages": [
19+
{
20+
"type": "pypi",
21+
"namespace": null,
22+
"name": "zipp",
23+
"version": "3.8.1",
24+
"qualifiers": {},
25+
"subpath": null,
26+
"primary_language": "Python",
27+
"description": "Backport of pathlib-compatible object wrapper for zip files\n.. image:: https://img.shields.io/pypi/v/zipp.svg\n :target: `PyPI link`_\n\n.. image:: https://img.shields.io/pypi/pyversions/zipp.svg\n :target: `PyPI link`_\n\n.. _PyPI link: https://pypi.org/project/zipp\n\n.. image:: https://github.com/jaraco/zipp/workflows/tests/badge.svg\n :target: https://github.com/jaraco/zipp/actions?query=workflow%3A%22tests%22\n :alt: tests\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Code style: Black\n\n.. .. image:: https://readthedocs.org/projects/skeleton/badge/?version=latest\n.. :target: https://skeleton.readthedocs.io/en/latest/?badge=latest\n\n.. image:: https://img.shields.io/badge/skeleton-2022-informational\n :target: https://blog.jaraco.com/skeleton\n\n.. image:: https://tidelift.com/badges/package/pypi/zipp\n :target: https://tidelift.com/subscription/pkg/pypi-zipp?utm_source=pypi-zipp&utm_medium=readme\n\n\nA pathlib-compatible Zipfile object wrapper. Official backport of the standard library\n`Path object <https://docs.python.org/3.8/library/zipfile.html#path-objects>`_.\n\n\nCompatibility\n=============\n\nNew features are introduced in this third-party library and later merged\ninto CPython. The following table indicates which versions of this library\nwere contributed to different versions in the standard library:\n\n.. list-table::\n :header-rows: 1\n\n * - zipp\n - stdlib\n * - 3.5\n - 3.11\n * - 3.3\n - 3.9\n * - 1.0\n - 3.8\n\n\nUsage\n=====\n\nUse ``zipp.Path`` in place of ``zipfile.Path`` on any Python.\n\nFor Enterprise\n==============\n\nAvailable as part of the Tidelift Subscription.\n\nThis project and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.\n\n`Learn more <https://tidelift.com/subscription/pkg/pypi-zipp?utm_source=pypi-zipp&utm_medium=referral&utm_campaign=github>`_.\n\nSecurity Contact\n================\n\nTo report a security vulnerability, please use the\n`Tidelift security contact <https://tidelift.com/security>`_.\nTidelift will coordinate the fix and disclosure.",
28+
"release_date": "2022-07-12T14:21:21",
29+
"parties": [
30+
{
31+
"type": "person",
32+
"role": "author",
33+
"name": "Jason R. Coombs",
34+
"email": "[email protected]",
35+
"url": null
36+
}
37+
],
38+
"keywords": [
39+
"Development Status :: 5 - Production/Stable",
40+
"Intended Audience :: Developers",
41+
"Programming Language :: Python :: 3",
42+
"Programming Language :: Python :: 3 :: Only"
43+
],
44+
"homepage_url": "https://github.com/jaraco/zipp",
45+
"download_url": "https://files.pythonhosted.org/packages/3b/e3/fb79a1ea5f3a7e9745f688855d3c673f2ef7921639a380ec76f7d4d83a85/zipp-3.8.1.tar.gz",
46+
"size": 14189,
47+
"sha1": null,
48+
"md5": "6f15c3e3c78919f8936749b0033e0cea",
49+
"sha256": "05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2",
50+
"sha512": null,
51+
"bug_tracking_url": null,
52+
"code_view_url": null,
53+
"vcs_url": null,
54+
"copyright": null,
55+
"license_expression": null,
56+
"declared_license": {
57+
"classifiers": [
58+
"License :: OSI Approved :: MIT License"
59+
]
60+
},
61+
"notice_text": null,
62+
"source_packages": [],
63+
"file_references": [],
64+
"extra_data": {},
65+
"dependencies": [],
66+
"repository_homepage_url": null,
67+
"repository_download_url": null,
68+
"api_data_url": "https://pypi.org/pypi/zipp/3.8.1/json",
69+
"datasource_id": null,
70+
"purl": "pkg:pypi/[email protected]"
71+
}
72+
],
73+
"resolved_dependencies_graph": [
74+
{
75+
"package": "pkg:pypi/[email protected]",
76+
"dependencies": []
77+
}
78+
]
79+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"headers": {
3+
"tool_name": "python-inspector",
4+
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
5+
"options": [
6+
"--index-url https://pypi.org/simple",
7+
"--index-url https://thirdparty.aboutcode.org/pypi/simple/",
8+
"--json <file>",
9+
"--operating-system linux",
10+
"--python-version 38",
11+
"--specifier zipp~=3.8.0"
12+
],
13+
"notice": "Dependency tree generated with python-inspector.\npython-inspector is a free software tool from nexB Inc. and others.\nVisit https://github.com/aboutcode-org/python-inspector/ for support and download.",
14+
"warnings": [],
15+
"errors": []
16+
},
17+
"files": [],
18+
"packages": [
19+
{
20+
"type": "pypi",
21+
"namespace": null,
22+
"name": "zipp",
23+
"version": "3.8.1",
24+
"qualifiers": {},
25+
"subpath": null,
26+
"primary_language": "Python",
27+
"description": "Backport of pathlib-compatible object wrapper for zip files\n.. image:: https://img.shields.io/pypi/v/zipp.svg\n :target: `PyPI link`_\n\n.. image:: https://img.shields.io/pypi/pyversions/zipp.svg\n :target: `PyPI link`_\n\n.. _PyPI link: https://pypi.org/project/zipp\n\n.. image:: https://github.com/jaraco/zipp/workflows/tests/badge.svg\n :target: https://github.com/jaraco/zipp/actions?query=workflow%3A%22tests%22\n :alt: tests\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Code style: Black\n\n.. .. image:: https://readthedocs.org/projects/skeleton/badge/?version=latest\n.. :target: https://skeleton.readthedocs.io/en/latest/?badge=latest\n\n.. image:: https://img.shields.io/badge/skeleton-2022-informational\n :target: https://blog.jaraco.com/skeleton\n\n.. image:: https://tidelift.com/badges/package/pypi/zipp\n :target: https://tidelift.com/subscription/pkg/pypi-zipp?utm_source=pypi-zipp&utm_medium=readme\n\n\nA pathlib-compatible Zipfile object wrapper. Official backport of the standard library\n`Path object <https://docs.python.org/3.8/library/zipfile.html#path-objects>`_.\n\n\nCompatibility\n=============\n\nNew features are introduced in this third-party library and later merged\ninto CPython. The following table indicates which versions of this library\nwere contributed to different versions in the standard library:\n\n.. list-table::\n :header-rows: 1\n\n * - zipp\n - stdlib\n * - 3.5\n - 3.11\n * - 3.3\n - 3.9\n * - 1.0\n - 3.8\n\n\nUsage\n=====\n\nUse ``zipp.Path`` in place of ``zipfile.Path`` on any Python.\n\nFor Enterprise\n==============\n\nAvailable as part of the Tidelift Subscription.\n\nThis project and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.\n\n`Learn more <https://tidelift.com/subscription/pkg/pypi-zipp?utm_source=pypi-zipp&utm_medium=referral&utm_campaign=github>`_.\n\nSecurity Contact\n================\n\nTo report a security vulnerability, please use the\n`Tidelift security contact <https://tidelift.com/security>`_.\nTidelift will coordinate the fix and disclosure.",
28+
"release_date": "2022-07-12T14:21:21",
29+
"parties": [
30+
{
31+
"type": "person",
32+
"role": "author",
33+
"name": "Jason R. Coombs",
34+
"email": "[email protected]",
35+
"url": null
36+
}
37+
],
38+
"keywords": [
39+
"Development Status :: 5 - Production/Stable",
40+
"Intended Audience :: Developers",
41+
"Programming Language :: Python :: 3",
42+
"Programming Language :: Python :: 3 :: Only"
43+
],
44+
"homepage_url": "https://github.com/jaraco/zipp",
45+
"download_url": "https://files.pythonhosted.org/packages/3b/e3/fb79a1ea5f3a7e9745f688855d3c673f2ef7921639a380ec76f7d4d83a85/zipp-3.8.1.tar.gz",
46+
"size": 14189,
47+
"sha1": null,
48+
"md5": "6f15c3e3c78919f8936749b0033e0cea",
49+
"sha256": "05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2",
50+
"sha512": null,
51+
"bug_tracking_url": null,
52+
"code_view_url": null,
53+
"vcs_url": null,
54+
"copyright": null,
55+
"license_expression": null,
56+
"declared_license": {
57+
"classifiers": [
58+
"License :: OSI Approved :: MIT License"
59+
]
60+
},
61+
"notice_text": null,
62+
"source_packages": [],
63+
"file_references": [],
64+
"extra_data": {},
65+
"dependencies": [],
66+
"repository_homepage_url": null,
67+
"repository_download_url": null,
68+
"api_data_url": "https://pypi.org/pypi/zipp/3.8.1/json",
69+
"datasource_id": null,
70+
"purl": "pkg:pypi/[email protected]"
71+
}
72+
],
73+
"resolved_dependencies_graph": [
74+
{
75+
"package": "pkg:pypi/[email protected]",
76+
"dependencies": []
77+
}
78+
]
79+
}

tests/data/tilde_req-expected.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
55
"options": [
66
"--index-url https://pypi.org/simple",
7+
"--index-url https://thirdparty.aboutcode.org/pypi/simple/",
78
"--json <file>",
89
"--operating-system linux",
910
"--python-version 38",
@@ -24,7 +25,7 @@
2425
"subpath": null,
2526
"primary_language": "Python",
2627
"description": "Backport of pathlib-compatible object wrapper for zip files\n.. image:: https://img.shields.io/pypi/v/zipp.svg\n :target: `PyPI link`_\n\n.. image:: https://img.shields.io/pypi/pyversions/zipp.svg\n :target: `PyPI link`_\n\n.. _PyPI link: https://pypi.org/project/zipp\n\n.. image:: https://github.com/jaraco/zipp/workflows/tests/badge.svg\n :target: https://github.com/jaraco/zipp/actions?query=workflow%3A%22tests%22\n :alt: tests\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Code style: Black\n\n.. .. image:: https://readthedocs.org/projects/skeleton/badge/?version=latest\n.. :target: https://skeleton.readthedocs.io/en/latest/?badge=latest\n\n.. image:: https://img.shields.io/badge/skeleton-2022-informational\n :target: https://blog.jaraco.com/skeleton\n\n.. image:: https://tidelift.com/badges/package/pypi/zipp\n :target: https://tidelift.com/subscription/pkg/pypi-zipp?utm_source=pypi-zipp&utm_medium=readme\n\n\nA pathlib-compatible Zipfile object wrapper. Official backport of the standard library\n`Path object <https://docs.python.org/3.8/library/zipfile.html#path-objects>`_.\n\n\nCompatibility\n=============\n\nNew features are introduced in this third-party library and later merged\ninto CPython. The following table indicates which versions of this library\nwere contributed to different versions in the standard library:\n\n.. list-table::\n :header-rows: 1\n\n * - zipp\n - stdlib\n * - 3.5\n - 3.11\n * - 3.3\n - 3.9\n * - 1.0\n - 3.8\n\n\nUsage\n=====\n\nUse ``zipp.Path`` in place of ``zipfile.Path`` on any Python.\n\nFor Enterprise\n==============\n\nAvailable as part of the Tidelift Subscription.\n\nThis project and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.\n\n`Learn more <https://tidelift.com/subscription/pkg/pypi-zipp?utm_source=pypi-zipp&utm_medium=referral&utm_campaign=github>`_.\n\nSecurity Contact\n================\n\nTo report a security vulnerability, please use the\n`Tidelift security contact <https://tidelift.com/security>`_.\nTidelift will coordinate the fix and disclosure.",
27-
"release_date": "2022-07-12T14:21:20",
28+
"release_date": "2022-07-12T14:21:21",
2829
"parties": [
2930
{
3031
"type": "person",
@@ -41,11 +42,11 @@
4142
"Programming Language :: Python :: 3 :: Only"
4243
],
4344
"homepage_url": "https://github.com/jaraco/zipp",
44-
"download_url": "https://files.pythonhosted.org/packages/f0/36/639d6742bcc3ffdce8b85c31d79fcfae7bb04b95f0e5c4c6f8b206a038cc/zipp-3.8.1-py3-none-any.whl",
45-
"size": 5645,
45+
"download_url": "https://files.pythonhosted.org/packages/3b/e3/fb79a1ea5f3a7e9745f688855d3c673f2ef7921639a380ec76f7d4d83a85/zipp-3.8.1.tar.gz",
46+
"size": 14189,
4647
"sha1": null,
47-
"md5": "300aa262796e7ebfb57b4d6731821c29",
48-
"sha256": "47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009",
48+
"md5": "6f15c3e3c78919f8936749b0033e0cea",
49+
"sha256": "05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2",
4950
"sha512": null,
5051
"bug_tracking_url": null,
5152
"code_view_url": null,

tests/test_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def test_cli_with_azure_devops_with_python_38():
351351

352352
@pytest.mark.online
353353
def test_cli_with_multiple_index_url_and_tilde_req_with_max_rounds():
354-
expected_file = test_env.get_test_loc("tilde_req-expected.json", must_exist=False)
354+
expected_file = test_env.get_test_loc("tilde_req-expected-max-rounds.json", must_exist=False)
355355
specifier = "zipp~=3.8.0"
356356
extra_options = [
357357
"--index-url",
@@ -371,7 +371,7 @@ def test_cli_with_multiple_index_url_and_tilde_req_with_max_rounds():
371371

372372
@pytest.mark.online
373373
def test_cli_with_multiple_index_url_and_tilde_req_and_netrc_file_without_matching_url():
374-
expected_file = test_env.get_test_loc("tilde_req-expected.json", must_exist=False)
374+
expected_file = test_env.get_test_loc("tilde_req-expected-netrc.json", must_exist=False)
375375
netrc_file = test_env.get_test_loc("test-commented.netrc", must_exist=False)
376376
specifier = "zipp~=3.8.0"
377377
extra_options = [

0 commit comments

Comments
 (0)