-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 1.14 KB
/
Makefile
File metadata and controls
40 lines (31 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.PHONY: test test-working test-cov test-unit test-integration test-slow clean install
# Install dependencies
install:
./env/bin/pip install pytest pytest-flask pytest-cov requests
# Run all tests (unit + integration)
test:
./env/bin/python -m pytest tests/ -v
# Run only unit tests (fast, with mocks)
test-unit:
./env/bin/python -m pytest tests/test_routes.py -v
# Run only integration tests (slow, real HLTV connections)
test-integration:
./env/bin/python -m pytest tests/test_integration_real.py -v
# Run only fast tests (exclude slow integration tests)
test-fast:
./env/bin/python -m pytest -m "not slow" tests/ -v
# Run only slow tests (integration tests)
test-slow:
./env/bin/python -m pytest -m "slow" tests/ -v
# Run tests with coverage report
test-cov:
./env/bin/python -m pytest --cov=routes --cov-report=html --cov-report=term tests/
# Clean cache and temp files
clean:
find . -type d -name "__pycache__" -exec rm -r {} +
find . -type d -name ".pytest_cache" -exec rm -r {} +
find . -name "*.pyc" -delete
rm -rf htmlcov/
# Run specific test
test-one:
./env/bin/python -m pytest tests/test_routes.py::TestRoutesEndpoints::$(TEST) -v