Use pytest tests
This commit is contained in:
@@ -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
@@ -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
@@ -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 = ["../.."]
|
||||
|
||||
Reference in New Issue
Block a user