forked from Archives/langchain
make running specific unit tests easier (#4336)
I find it's easier to do TDD if i can run specific unit tests. I know watch is there but some people prefer running their tests manually.
This commit is contained in:
parent
80558b5b27
commit
05e749d9fe
7
Makefile
7
Makefile
@ -32,11 +32,13 @@ lint lint_diff:
|
|||||||
poetry run black $(PYTHON_FILES) --check
|
poetry run black $(PYTHON_FILES) --check
|
||||||
poetry run ruff .
|
poetry run ruff .
|
||||||
|
|
||||||
|
TEST_FILE ?= tests/unit_tests/
|
||||||
|
|
||||||
test:
|
test:
|
||||||
poetry run pytest tests/unit_tests
|
poetry run pytest $(TEST_FILE)
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
poetry run pytest tests/unit_tests
|
poetry run pytest $(TEST_FILE)
|
||||||
|
|
||||||
test_watch:
|
test_watch:
|
||||||
poetry run ptw --now . -- tests/unit_tests
|
poetry run ptw --now . -- tests/unit_tests
|
||||||
@ -57,6 +59,7 @@ help:
|
|||||||
@echo 'format - run code formatters'
|
@echo 'format - run code formatters'
|
||||||
@echo 'lint - run linters'
|
@echo 'lint - run linters'
|
||||||
@echo 'test - run unit tests'
|
@echo 'test - run unit tests'
|
||||||
|
@echo 'test TEST_FILE=<test_file> - run all tests in file'
|
||||||
@echo 'test_watch - run unit tests in watch mode'
|
@echo 'test_watch - run unit tests in watch mode'
|
||||||
@echo 'integration_tests - run integration tests'
|
@echo 'integration_tests - run integration tests'
|
||||||
@echo 'docker_tests - run unit tests in docker'
|
@echo 'docker_tests - run unit tests in docker'
|
||||||
|
Loading…
Reference in New Issue
Block a user