diff --git a/development.md b/development.md index a402a872..bbb3def9 100644 --- a/development.md +++ b/development.md @@ -1,5 +1,11 @@ ## Running unit tests + +Native python: ``` python -m unittest tests/ ``` +Embedded python (Windows zip file installation method): +``` +..\python_embeded\python.exe -m unittest +``` diff --git a/tests/test_utils.py b/tests/test_utils.py index 7b1cf87c..0698dcc8 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,10 +1,10 @@ import unittest + from modules import util class TestUtils(unittest.TestCase): def test_can_parse_tokens_with_lora(self): - test_cases = [ { "input": ("some prompt, very cool, , cool ", [], 5), @@ -36,13 +36,13 @@ class TestUtils(unittest.TestCase): "output": [("you-lora.safetensors", 0.2)], }, { - "input": (", , and ",[], 6), - "output": [] + "input": (", , and ", [], 6), + "output": [] } ] for test in test_cases: - promp, loras, loras_limit = test["input"] + prompt, loras, loras_limit = test["input"] expected = test["output"] - actual = util.parse_lora_references_from_prompt(promp, loras, loras_limit) + actual = util.parse_lora_references_from_prompt(prompt, loras, loras_limit) self.assertEqual(expected, actual)