2013-02-18 21:09:40 +00:00
|
|
|
SHELL := /bin/bash
|
|
|
|
|
2017-11-10 09:44:02 +00:00
|
|
|
ifeq ($(TEST_SERVER_MODE), true)
|
2020-09-04 11:14:48 +00:00
|
|
|
# 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
|
2017-11-10 09:44:02 +00:00
|
|
|
else
|
|
|
|
TEST_EXCLUDE :=
|
2021-10-05 17:11:07 +00:00
|
|
|
PARALLEL_TESTS := ./tests/test_core
|
2017-11-10 09:44:02 +00:00
|
|
|
endif
|
|
|
|
|
2013-02-18 21:09:40 +00:00
|
|
|
init:
|
2013-05-03 23:33:13 +00:00
|
|
|
@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
|
2019-10-27 01:47:45 +00:00
|
|
|
black --check moto/ tests/
|
2021-12-01 23:06:58 +00:00
|
|
|
pylint -j 0 moto/a* moto/b* moto/c* tests
|
2017-03-13 00:18:49 +00:00
|
|
|
|
2020-12-03 18:32:06 +00:00
|
|
|
format:
|
|
|
|
black moto/ tests/
|
|
|
|
|
2019-10-27 01:47:45 +00:00
|
|
|
test-only:
|
2021-01-26 12:37:03 +00:00
|
|
|
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)
|
2018-11-27 16:12:41 +00:00
|
|
|
|
2019-10-27 01:47:45 +00:00
|
|
|
test: lint test-only
|
|
|
|
|
2017-02-24 00:43:48 +00:00
|
|
|
test_server:
|
2021-02-02 18:01:00 +00:00
|
|
|
@TEST_SERVER_MODE=true pytest -sv --cov=moto --cov-report xml ./tests/
|
2017-02-24 00:43:48 +00:00
|
|
|
|
2017-09-19 21:01:08 +00:00
|
|
|
aws_managed_policies:
|
|
|
|
scripts/update_managed_policies.py
|
|
|
|
|
2017-10-25 10:28:18 +00:00
|
|
|
implementation_coverage:
|
2018-06-01 10:30:42 +00:00
|
|
|
./scripts/implementation_coverage.py
|
2017-11-20 20:13:44 +00:00
|
|
|
git commit IMPLEMENTATION_COVERAGE.md -m "Updating implementation coverage" || true
|
2017-10-25 10:28:18 +00:00
|
|
|
|
2017-09-22 10:23:10 +00:00
|
|
|
scaffold:
|
|
|
|
@pip install -r requirements-dev.txt > /dev/null
|
2017-09-25 21:11:11 +00:00
|
|
|
exec python scripts/scaffold.py
|
2020-09-13 15:08:23 +00:00
|
|
|
|
|
|
|
int_test:
|
|
|
|
@./scripts/int_test.sh
|