demo
This commit is contained in:
15
tests/test_cpu_monitor.py
Normal file
15
tests/test_cpu_monitor.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import unittest
|
||||
|
||||
import cpu_monitor
|
||||
|
||||
|
||||
class TestCpuMonitor(unittest.TestCase):
|
||||
def test_format_line_returns_string(self):
|
||||
line = cpu_monitor.format_line()
|
||||
self.assertIsInstance(line, str)
|
||||
self.assertIn("CPU:", line)
|
||||
self.assertIn("RAM:", line)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user