-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scenarios: add tests for Requires-Python
This tests the interaction between `Requires-Python` and marker expressions like `python_version` and `python_full_version`. In both of these tests, the `a` dependency should be completely ignored because its corresponding marker expression will never evaluate to true.
- Loading branch information
1 parent
3dd7c2d
commit 421bba0
Showing
3 changed files
with
63 additions
and
0 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 |
---|---|---|
@@ -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"] |
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 |
---|---|---|
@@ -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"] |
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 |
---|---|---|
@@ -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"] |