Skip to content

Commit

Permalink
add debug print for cpu percentages and change checking percentage to -1
Browse files Browse the repository at this point in the history
  • Loading branch information
Richardvdketterij committed Jan 17, 2024
1 parent c093e87 commit 980eb16
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,11 @@ def test_warn(self):
# function be called with at least 0.1 seconds between calls.
time.sleep(0.1)

warning_percentage2 = 0
warning_percentage2 = -1
task2 = CpuTask(warning_percentage2)
stat2 = DiagnosticStatusWrapper()
task2.run(stat2)
print(f'Raw readings: {task2._readings}')
self.assertEqual(task2.name, 'CPU Information')
self.assertEqual(stat2.level, DiagnosticStatus.WARN)
self.assertIn(str('At least one CPU exceeds'), stat2.message)
Expand Down

0 comments on commit 980eb16

Please sign in to comment.