summaryrefslogtreecommitdiff
path: root/Biz/Llamacpp.py
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Llamacpp.py')
-rw-r--r--Biz/Llamacpp.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/Biz/Llamacpp.py b/Biz/Llamacpp.py
index 9a2ff86..66b57d8 100644
--- a/Biz/Llamacpp.py
+++ b/Biz/Llamacpp.py
@@ -19,14 +19,22 @@ class TestLlamaCpp(unittest.TestCase):
def test_in_path(self) -> None:
"""Test that llama.cpp is in $PATH."""
- self.assertTrue("llama-cpp" in os.environ.get("PATH", ""))
+ 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":
- sys.argv.pop()
- unittest.main()
+ test()
else:
sys.exit(0)