Skip to content

Commit

Permalink
Improved test command
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertSamoilescu committed Dec 10, 2024
1 parent f1c394f commit 21379eb
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ install-dev:
install:
pip install -e .[all]

# Note: The pytest-randomly seed is fixed at 0 for now. Once the legacy np.random.seed(0)'s
# are removed from tests, this can be removed, allowing all tests to use random seeds.
.PHONY: test
test: ## Run all tests
python setup.py test
test:
TF_USE_KERAS_LEGACY=1 pytest --randomly-seed=0 alibi_detect/utils/tests/test_saving_legacy.py
pytest --randomly-seed=0 --ignore=alibi_detect/utils/tests/test_saving_legacy.py alibi_detect

.PHONY: lint
lint: ## Check linting according to the flake8 configuration in setup.cfg
Expand Down Expand Up @@ -69,8 +72,3 @@ tox-env=default
repl:
env COMMAND="python" tox -e $(tox-env)

# Note: The pytest-randomly seed is fixed at 0 for now. Once the legacy np.random.seed(0)'s
# are removed from tests, this can be removed, allowing all tests to use random seeds.
test:
TF_USE_KERAS_LEGACY=1 pytest --randomly-seed=0 alibi_detect/saving/_tensorflow/tests/test_saving_tf.py
pytest --randomly-seed=0 alibi_detect --ignore alibi_detect/saving/_tensorflow/tests/test_saving_tf.py

0 comments on commit 21379eb

Please sign in to comment.