16 lines
329 B
Python
16 lines
329 B
Python
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()
|