Skip to content

Commit

Permalink
update assert
Browse files Browse the repository at this point in the history
  • Loading branch information
CSY-ModelCloud committed Dec 3, 2024
1 parent 112cbef commit 06bc767
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tests/gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
dev = Device("gpu")
print(dev)

assert dev.type == "gpu"
assert dev.pcie
assert dev.gpu
assert dev.type == "gpu", f"wrong type: {dev.type}"
if dev.pcie:
assert dev.pcie.gen
assert dev.pcie.speed
assert dev.pcie.id
if dev.gpu:
assert dev.gpu.driver
assert dev.gpu.firmware
assert dev.model
assert dev.memory_total > 10
assert dev.vendor
assert dev.features
assert dev.memory_total > 10, f"wrong memory size: {dev.memory_total}"

0 comments on commit 06bc767

Please sign in to comment.