refactor: convert script to automtu package with CI workflow

https://chatgpt.com/share/697112b2-0410-800f-93ff-9372b603d43f
This commit is contained in:
2026-01-21 18:53:44 +01:00
parent 78da3ffc73
commit dcc7a68973
23 changed files with 905 additions and 896 deletions

View File

@@ -0,0 +1,26 @@
import unittest
from unittest.mock import Mock, patch
import automtu.__main__ as entry
class TestMain(unittest.TestCase):
def test_main_calls_parser_and_core(self) -> None:
fake_args = object()
fake_parser = Mock()
fake_parser.parse_args.return_value = fake_args
with (
patch("automtu.__main__.build_parser", return_value=fake_parser) as p_build,
patch("automtu.__main__.run_automtu", return_value=0) as p_run,
):
rc = entry.main()
self.assertEqual(rc, 0)
p_build.assert_called_once_with()
fake_parser.parse_args.assert_called_once_with()
p_run.assert_called_once_with(fake_args)
if __name__ == "__main__":
unittest.main(verbosity=2)