Skip to content

Commit

Permalink
squash: update test and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
skycastlelily authored and happz committed Jul 21, 2024
1 parent c25fbe7 commit 2c98dbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/unit/test_hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_constraint_name_pattern(value: str, expected: tuple[Any, Any]) -> None:
({'name': 'num_with_default', 'raw_value': '10', 'default_unit': 'GiB'},
'num_with_default: == 10 gibibyte'),
({'name': 'num_without_default', 'raw_value': '1024'}, 'num_without_default: == 1024 byte'),
({'name': 'num_with_unit', 'raw_value': '10 GiB', 'default_unit': 'GiB'},
({'name': 'num_with_unit', 'raw_value': '10 GiB', 'default_unit': 'MiB'},
'num_with_unit: == 10 GiB'),
]

Expand Down
1 change: 1 addition & 0 deletions tmt/hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ def _from_specification(
:param original_constraint: when specified, new constraint logically belongs to
``original_constraint``, possibly representing one of its aspects.
:param allowed_operators: if specified, only operators on this list are accepted.
:param default_unit: if raw_value contains no unit, this unit will be appended.
:raises ParseError: when parsing fails, or the operator is now allowed.
:returns: a :py:class:`Constraint` representing the given specification.
"""
Expand Down

0 comments on commit 2c98dbb

Please sign in to comment.