Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby committed Feb 11, 2022
1 parent 135efc5 commit ea59115
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/packages/test_dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,3 +298,10 @@ 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_dependency_markers_are_the_same_as_markers():
marker = parse_marker('extra=="bar"')
dependency = Dependency.create_from_pep_508('foo ; extra=="bar"')

assert marker == dependency.marker

0 comments on commit ea59115

Please sign in to comment.