-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve flexibility of unit tests with respect to available Python ve…
…rsions (#8397)
- Loading branch information
1 parent
eb8ada5
commit 02448cf
Showing
2 changed files
with
24 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
from cleo.io.null_io import NullIO | ||
from deepdiff import DeepDiff | ||
from poetry.core.constraints.version import Version | ||
from poetry.core.packages.package import Package | ||
|
||
from poetry.factory import Factory | ||
from poetry.masonry.builders.editable import EditableBuilder | ||
|
@@ -125,8 +126,14 @@ def test_builder_installs_proper_files_for_standard_packages( | |
== "[console_scripts]\nbaz=bar:baz.boom.bim\nfoo=foo:bar\n" | ||
"fox=fuz.foo:bar.baz\n\n" | ||
) | ||
|
||
metadata = """\ | ||
python_classifiers = "\n".join( | ||
f"Classifier: Programming Language :: Python :: {version}" | ||
for version in sorted( | ||
Package.AVAILABLE_PYTHONS, | ||
key=lambda x: tuple(map(int, x.split("."))), | ||
) | ||
) | ||
metadata = f"""\ | ||
Metadata-Version: 2.1 | ||
Name: simple-project | ||
Version: 1.2.3 | ||
|
@@ -138,17 +145,7 @@ def test_builder_installs_proper_files_for_standard_packages( | |
Author-email: [email protected] | ||
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* | ||
Classifier: License :: OSI Approved :: MIT License | ||
Classifier: Programming Language :: Python :: 2 | ||
Classifier: Programming Language :: Python :: 2.7 | ||
Classifier: Programming Language :: Python :: 3 | ||
Classifier: Programming Language :: Python :: 3.4 | ||
Classifier: Programming Language :: Python :: 3.5 | ||
Classifier: Programming Language :: Python :: 3.6 | ||
Classifier: Programming Language :: Python :: 3.7 | ||
Classifier: Programming Language :: Python :: 3.8 | ||
Classifier: Programming Language :: Python :: 3.9 | ||
Classifier: Programming Language :: Python :: 3.10 | ||
Classifier: Programming Language :: Python :: 3.11 | ||
{python_classifiers} | ||
Classifier: Topic :: Software Development :: Build Tools | ||
Classifier: Topic :: Software Development :: Libraries :: Python Modules | ||
Project-URL: Documentation, https://python-poetry.org/docs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters