Use pytest tests

This commit is contained in:
asagi4
2026-02-04 16:39:50 +02:00
parent d14f5b789a
commit 805ffbf463
3 changed files with 7 additions and 7 deletions
+5 -4
View File
@@ -1,3 +1,4 @@
ARGS=
all: format check test
@echo "Done"
@@ -11,16 +12,16 @@ format:
ruff format
test:
python -m prompt_control.test_parser
PYTHONPATH=../../ pytest tests/test_parser.py $(ARGS)
test_graph:
PYTHONPATH=../../ python -m prompt_control.test_graph
PYTHONPATH=../../ pytest tests/test_graph.py $(ARGS)
test_encode:
PYTHONPATH=../../ python -m prompt_control.test_encode --verbose
PYTHONPATH=../../ pytest tests/test_encode.py $(ARGS)
test_encode_both:
TEST_TE="clip_l t5" PYTHONPATH=../../ python -m prompt_control.test_encode --verbose
TEST_TE="clip_l t5" PYTHONPATH=../../ pytest tests/test_encode.py $(ARGS)
test_heavy: test_graph test_encode_both
+1 -2
View File
@@ -11,8 +11,7 @@ import os
import sys
log = logging.getLogger("comfyui-prompt-control")
log.propagate = False
if not log.handlers:
if not log.handlers and "PYTEST_CURRENT_TEST" not in os.environ:
h = logging.StreamHandler(sys.stdout)
h.setFormatter(logging.Formatter("[PromptControl] %(levelname)s: %(message)s"))
log.addHandler(h)
+1 -1
View File
@@ -21,7 +21,7 @@ extraPaths = ["../../"]
exclude = ["prompt_control/*test*"]
[tool.ty.src]
exclude = ["prompt_control/*test*"]
exclude = ["tests/*.py", "prompt_control/*test*.py"]
[tool.ty.environment]
extra-paths = ["../.."]