Skip to content

Commit

Permalink
Add one more integrity test
Browse files Browse the repository at this point in the history
  • Loading branch information
jvstme authored and TheBits committed May 10, 2024
1 parent 751d487 commit 3e89c9d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/integrity_tests/test_oci.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,13 @@ def test_on_demand_present(data_rows: List[dict]):

def test_vm_present(data_rows: List[dict]):
assert any(name.startswith("VM") for name in map(itemgetter("instance_name"), data_rows))


def test_quantity_decreases_as_query_complexity_increases(data_rows: List[dict]):
zero_or_one_gpu = list(filter(lambda row: int(row["gpu_count"]) in (0, 1), data_rows))
zero_gpu = list(filter(lambda row: int(row["gpu_count"]) == 0, data_rows))
one_gpu = list(filter(lambda row: int(row["gpu_count"]) == 1, data_rows))

assert len(data_rows) > len(zero_or_one_gpu)
assert len(zero_or_one_gpu) > len(zero_gpu)
assert len(zero_gpu) > len(one_gpu)

0 comments on commit 3e89c9d

Please sign in to comment.