Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create unit_test folder and moved the unit tests into it #644

Merged
merged 3 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ ARGS =

.PHONY: build

PYTEST_WATCH_MODULES = tests/unit_test

venv-clean:
@if [ -d "$(VENV)" ]; then \
Expand Down Expand Up @@ -99,18 +100,18 @@ dev-nbstripout-install:
$(VENV)/bin/nbstripout --install


dev-lint: dev-flake8 dev-pylint dev-notebook-lint
dev-lint: dev-flake8 dev-pylint dev-mypy dev-notebook-lint


dev-pytest:
$(PYTHON) -m pytest -p no:cacheprovider $(ARGS)
dev-unittest:
$(PYTHON) -m pytest -p no:cacheprovider $(ARGS) tests/unit_test


dev-watch:
$(PYTHON) -m pytest_watch -- -p no:cacheprovider -p no:warnings $(ARGS)
$(PYTHON) -m pytest_watch -- -p no:cacheprovider $(ARGS) $(PYTEST_WATCH_MODULES)


dev-test: dev-lint dev-pytest
dev-test: dev-lint dev-unittest


dev-run-sample-notebook:
Expand Down Expand Up @@ -199,16 +200,16 @@ notebook-nbstripout-check:
'


pytest:
$(DEV_RUN) pytest -p no:cacheprovider $(ARGS)
unittest:
$(DEV_RUN) pytest -p no:cacheprovider $(ARGS) tests/unit_test


pytest-not-slow:
@$(MAKE) ARGS="$(ARGS) $(NOT_SLOW_PYTEST_ARGS)" pytest
unittest-not-slow:
@$(MAKE) ARGS="$(ARGS) $(NOT_SLOW_PYTEST_ARGS)" unittest


.watch:
$(DEV_RUN) pytest-watch -- -p no:cacheprovider -p no:warnings $(ARGS)
$(DEV_RUN) pytest-watch -- -p no:cacheprovider $(ARGS) $(PYTEST_WATCH_MODULES)


watch-slow:
Expand All @@ -222,7 +223,7 @@ watch:
lint: flake8 pylint mypy notebook-lint


test: lint pytest
test: lint unittest


airflow-build:
Expand Down
3 changes: 2 additions & 1 deletion run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ flake8 tests/ data_science_pipeline/ dags/
echo "running mypy"
mypy tests/ data_science_pipeline/ dags/

pytest tests/ -p no:cacheprovider -s --disable-warnings
echo "running unit tests"
pytest tests/unit_test -p no:cacheprovider -s --disable-warnings

echo "done"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.