Skip to content

Commit

Permalink
Document comparisons between marker objects
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Jan 21, 2022
1 parent 6d56b29 commit 2a56fd1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/markers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ Usage
>>> extra_environment['extra'] = 'bar'
>>> extra.evaluate(environment=extra_environment)
True
>>> # You can do simple comparisons between marker objects:
>>> Marker("python_version > '3.6'") == Marker("python_version > '3.6'")
True
>>> # You can also do simple comparissons between sets of markers:
>>> markers1 = {Marker("python_version > '3.6'"), Marker('os_name == "unix"')}
>>> markers2 = {Marker('os_name == "unix"'), Marker("python_version > '3.6'")}
>>> markers1 == markers2
True


Reference
Expand Down

0 comments on commit 2a56fd1

Please sign in to comment.