summaryrefslogtreecommitdiff
path: root/Omni/Llamacpp.py
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2025-05-22 13:53:08 -0400
committerBen Sima <ben@bsima.me>2025-05-22 13:53:08 -0400
commit202c8cf1112bf59ce8dbec886af02c226c0f4b3e (patch)
tree636eba5d4060c85ff72f3a3323b8ce4f3d641ad6 /Omni/Llamacpp.py
parent2bba78efc8a203785742355aa3f8852034e27e0d (diff)
Add TestCase to Omni.Test
Also improves the Example.py a bit with a real test case and example of how to use Omni.Test.
Diffstat (limited to 'Omni/Llamacpp.py')
-rwxr-xr-xOmni/Llamacpp.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/Omni/Llamacpp.py b/Omni/Llamacpp.py
index eac08fd..bf44d5e 100755
--- a/Omni/Llamacpp.py
+++ b/Omni/Llamacpp.py
@@ -10,6 +10,9 @@ sure llama-cpp still works in case I need/want to switch at some point.
# : out llamacpp-test
# : run llama-cpp
+import Omni.App as App
+import Omni.Log as Log
+import Omni.Test as Test
import os
import sys
import unittest
@@ -23,18 +26,10 @@ class TestLlamaCpp(unittest.TestCase):
self.assertIn("llama-cpp", os.environ.get("PATH", ""))
-def test() -> None:
- """Run this module's test suite."""
- suite = unittest.TestSuite()
- suite.addTests(
- unittest.defaultTestLoader.loadTestsFromTestCase(TestLlamaCpp),
- )
- unittest.TextTestRunner().run(suite)
-
-
def main() -> None:
"""Entrypoint."""
if sys.argv[1] == "test":
- test()
+ Log.setup()
+ Test.run(App.Area.Test, [TestLlamaCpp])
else:
sys.exit(0)