Skip to content

Commit

Permalink
Fixing the test
Browse files Browse the repository at this point in the history
  • Loading branch information
yassinkhalifa committed Aug 27, 2024
1 parent 08e8d8f commit 7f1591a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_crc_idle.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ def test_count_idle_gpu_resources(self, mock_run_command: Mock) -> None:

cluster = 'gpu'
partition = 'default'
mock_run_command.return_value = "node1_4_2_idle_3500\nnode2_4_4_drain_4000"
mock_run_command.return_value = "node1_4_2_idle_3500\nnode2_4_4_drain_N/A"

app = CrcIdle()
result = app.count_idle_resources(cluster, partition)
expected = {2: {'count': 1, 'min_free_mem': 3500, 'max_free_mem': 3500},
0: {'count': 1, 'min_free_mem': 4000, 'max_free_mem': 4000}
0: {'count': 1, 'min_free_mem': 0, 'max_free_mem': 0}
}
self.assertEqual(expected, result)

Expand Down

0 comments on commit 7f1591a

Please sign in to comment.