moto/Makefile

50 lines
1.2 KiB
Makefile
Raw Normal View History

2013-02-18 21:09:40 +00:00
SHELL := /bin/bash
ifeq ($(TEST_SERVER_MODE), true)
# exclude test_kinesisvideoarchivedmedia
# because testing with moto_server is difficult with data-endpoint
2021-10-05 17:11:07 +00:00
TEST_EXCLUDE := -k 'not (test_kinesisvideoarchivedmedia or test_awslambda or test_batch or test_ec2 or test_sqs)'
# Parallel tests will be run separate
PARALLEL_TESTS := ./tests/test_awslambda ./tests/test_batch ./tests/test_ec2 ./tests/test_sqs
else
TEST_EXCLUDE :=
2021-10-05 17:11:07 +00:00
PARALLEL_TESTS := ./tests/test_core
endif
2013-02-18 21:09:40 +00:00
init:
@python setup.py develop
2019-07-09 01:42:24 +00:00
@pip install -r requirements-dev.txt
2013-02-18 21:09:40 +00:00
2017-03-13 00:18:49 +00:00
lint:
flake8 moto
black --check moto/ tests/
pylint -j 0 moto/a* moto/b* moto/c* tests
2017-03-13 00:18:49 +00:00
format:
black moto/ tests/
test-only:
rm -f .coverage
rm -rf cover
pytest -sv --cov=moto --cov-report xml ./tests/ $(TEST_EXCLUDE)
2021-10-05 17:11:07 +00:00
MOTO_CALL_RESET_API=false pytest -n 4 $(PARALLEL_TESTS)
test: lint test-only
test_server:
@TEST_SERVER_MODE=true pytest -sv --cov=moto --cov-report xml ./tests/
aws_managed_policies:
scripts/update_managed_policies.py
implementation_coverage:
./scripts/implementation_coverage.py
git commit IMPLEMENTATION_COVERAGE.md -m "Updating implementation coverage" || true
scaffold:
@pip install -r requirements-dev.txt > /dev/null
2017-09-25 21:11:11 +00:00
exec python scripts/scaffold.py
int_test:
@./scripts/int_test.sh