Skip to content

Commit

Permalink
Testcase demonstrating bug
Browse files Browse the repository at this point in the history
Updating a marker in a way that removes python version constraints fails
to remove the python version constraint
  • Loading branch information
dimbleby committed Feb 5, 2022
1 parent 0113a5a commit 9ac4ebe
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/packages/test_dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,3 +298,13 @@ def test_marker_properly_sets_python_constraint():
dependency.marker = 'python_version >= "3.6" and python_version < "4.0"'

assert str(dependency.python_constraint) == ">=3.6,<4.0"


def test_marker_properly_unsets_python_constraint():
dependency = Dependency("foo", "^1.2.3")

dependency.marker = 'python_version >= "3.6"'
assert str(dependency.python_constraint) == ">=3.6"

dependency.marker = "*"
assert str(dependency.python_constraint) == "*"

0 comments on commit 9ac4ebe

Please sign in to comment.