From 39066900773e7857faf2d02e7ed51b71d219d97d Mon Sep 17 00:00:00 2001 From: godosa Date: Tue, 6 Oct 2026 23:39:36 +0200 Subject: godosa-engine: initial public history --- scripts/test_thread_instr.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 scripts/test_thread_instr.py (limited to 'scripts/test_thread_instr.py') diff --git a/scripts/test_thread_instr.py b/scripts/test_thread_instr.py new file mode 100644 index 0000000..d23e440 --- /dev/null +++ b/scripts/test_thread_instr.py @@ -0,0 +1,21 @@ +import sys +import unittest +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).resolve().parent)) +import thread_instr as ti + + +class ThreadInstrTests(unittest.TestCase): + def test_sums_threads_by_name(self): + text = "\n".join([ + "Game.Desk-100,5000,,instructions:u,100,100.00,,", + "audio-101,300,,instructions:u,100,100.00,,", + "audio-102,200,,instructions:u,100,100.00,,", + "gl0-103,,,instructions:u,0,0.00,,", + ]) + self.assertEqual(ti.parse(text), {"Game.Desk": 5000, "audio": 500}) + + +if __name__ == "__main__": + unittest.main() -- cgit