From 732afb65c56dcb8ae9bbdf468c2f3f0438169919 Mon Sep 17 00:00:00 2001 From: anthony-melin Date: Sun, 26 Jul 2026 15:15:32 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20test=20entrypoint=20class?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_entrypoints.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/test_entrypoints.py diff --git a/tests/test_entrypoints.py b/tests/test_entrypoints.py new file mode 100644 index 0000000..a88d29d --- /dev/null +++ b/tests/test_entrypoints.py @@ -0,0 +1,25 @@ +import unittest + +from elironwars.entrypoints import Entrypoints +from elironwars.console import ConsoleUi + + +class TestEntrypoints(unittest.TestCase): + + def test_load_console_ui(self): + console_ep = 'console' + + ep = Entrypoints() + self.assertIn(console_ep, ep.ui.names) + self.assertIsInstance(ep.load_ui(console_ep), ConsoleUi) + + def test_load_unknown_ui(self): + unknown_ep = 'unknown' + + ep = Entrypoints() + self.assertNotIn(unknown_ep, ep.ui.names) + self.assertIsNone(ep.load_ui(unknown_ep), ConsoleUi) + + +if __name__ == "__main__": + unittest.main()