diff --git a/cpu_monitor.py b/cpu_monitor.py index 543b97f..2b84c6b 100644 --- a/cpu_monitor.py +++ b/cpu_monitor.py @@ -27,3 +27,4 @@ def main() -> None: if __name__ == "__main__": main() +# faire une fonction qui affiche hello diff --git a/tests/test_cpu_monitor.py b/tests/test_cpu_monitor.py new file mode 100644 index 0000000..7eca7c4 --- /dev/null +++ b/tests/test_cpu_monitor.py @@ -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()