Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scenarios: add tests for Requires-Python #187

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions scenarios/fork/requires-python-full-prerelease.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name = "fork-requires-python-full-prerelease"
description = '''
This tests that a `Requires-Python` specifier will result in the
exclusion of dependency specifications that cannot possibly satisfy it.

In particular, this is tested via the `python_full_version` marker with
a pre-release version.
'''

[resolver_options]
universal = true

[expected]
satisfiable = false

[root]
requires_python = ">=3.10"
requires = [
"a==1.0.0 ; python_full_version == '3.9b1'",
]

[packages.a.versions."1.0.0"]
22 changes: 22 additions & 0 deletions scenarios/fork/requires-python-full.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name = "fork-requires-python-full"
description = '''
This tests that a `Requires-Python` specifier will result in the
exclusion of dependency specifications that cannot possibly satisfy it.

In particular, this is tested via the `python_full_version` marker
instead of the more common `python_version` marker.
'''

[resolver_options]
universal = true

[expected]
satisfiable = false

[root]
requires_python = ">=3.10"
requires = [
"a==1.0.0 ; python_full_version == '3.9'",
]

[packages.a.versions."1.0.0"]
19 changes: 19 additions & 0 deletions scenarios/fork/requires-python.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name = "fork-requires-python"
description = '''
This tests that a `Requires-Python` specifier will result in the
exclusion of dependency specifications that cannot possibly satisfy it.
'''

[resolver_options]
universal = true

[expected]
satisfiable = false

[root]
requires_python = ">=3.10"
requires = [
"a==1.0.0 ; python_version == '3.9'",
]

[packages.a.versions."1.0.0"]