Skip to content

Commit

Permalink
squash: extend test
Browse files Browse the repository at this point in the history
  • Loading branch information
skycastlelily committed Oct 18, 2024
1 parent 046397d commit 0b5fb41
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion tests/unit/provision/mrack/test_hw.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,14 @@ def test_maximal_constraint(root_logger: Logger) -> None:
},
{'or': []},
{'or': []},
{'or': []},
{
'cpu': {
'stepping': {
'_op': '!=',
'_value': '10',
},
},
},
{'or': []},
{
'not':
Expand Down Expand Up @@ -386,6 +393,20 @@ def test_cpu_cores(root_logger: Logger) -> None:
}


def test_cpu_stepping(root_logger: Logger) -> None:
result = _CONSTRAINT_TRANSFORMERS['cpu.stepping'](
_parse_cpu({'stepping': '10'}), root_logger)

assert result.to_mrack() == {
'cpu': {
'stepping': {
'_op': '==',
'_value': '10'
}
}
}


def test_cpu_vendor_name(root_logger: Logger) -> None:
result = _CONSTRAINT_TRANSFORMERS['cpu.vendor_name'](
_parse_cpu({'vendor-name': 'GenuineIntel'}), root_logger)
Expand Down

0 comments on commit 0b5fb41

Please sign in to comment.