Makefile for test merged with the main one
This commit is contained in:
4
Makefile
4
Makefile
@@ -92,6 +92,10 @@ test-coverage:
|
|||||||
test-fast:
|
test-fast:
|
||||||
pytest tests/ -v -m "not slow"
|
pytest tests/ -v -m "not slow"
|
||||||
|
|
||||||
|
# Run slow tests only
|
||||||
|
test-slow:
|
||||||
|
pytest tests/ -v -m slow
|
||||||
|
|
||||||
test-auth:
|
test-auth:
|
||||||
pytest tests/test_auth.py -v
|
pytest tests/test_auth.py -v
|
||||||
|
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
# Makefile for running tests
|
|
||||||
# tests/Makefile
|
|
||||||
.PHONY: test test-unit test-integration test-coverage test-fast test-slow
|
|
||||||
|
|
||||||
# Run all tests
|
|
||||||
test:
|
|
||||||
pytest tests/ -v
|
|
||||||
|
|
||||||
# Run only unit tests
|
|
||||||
test-unit:
|
|
||||||
pytest tests/ -v -m unit
|
|
||||||
|
|
||||||
# Run only integration tests
|
|
||||||
test-integration:
|
|
||||||
pytest tests/ -v -m integration
|
|
||||||
|
|
||||||
# Run tests with coverage report
|
|
||||||
test-coverage:
|
|
||||||
pytest tests/ --cov=app --cov=models --cov=utils --cov=middleware --cov-report=html --cov-report=term-missing
|
|
||||||
|
|
||||||
# Run fast tests only (exclude slow ones)
|
|
||||||
test-fast:
|
|
||||||
pytest tests/ -v -m "not slow"
|
|
||||||
|
|
||||||
# Run slow tests only
|
|
||||||
test-slow:
|
|
||||||
pytest tests/ -v -m slow
|
|
||||||
|
|
||||||
# Run specific test file
|
|
||||||
test-auth:
|
|
||||||
pytest tests/test_auth.py -v
|
|
||||||
|
|
||||||
test-products:
|
|
||||||
pytest tests/test_products.py -v
|
|
||||||
|
|
||||||
test-stock:
|
|
||||||
pytest tests/test_stock.py -v
|
|
||||||
|
|
||||||
# Clean up test artifacts
|
|
||||||
clean:
|
|
||||||
rm -rf htmlcov/
|
|
||||||
rm -rf .pytest_cache/
|
|
||||||
rm -rf .coverage
|
|
||||||
find . -type d -name "__pycache__" -exec rm -rf {} +
|
|
||||||
find . -name "*.pyc" -delete
|
|
||||||
|
|
||||||
# Install test dependencies
|
|
||||||
install-test-deps:
|
|
||||||
pip install -r tests/requirements_test.txt
|
|
||||||
validate_csv_headers(valid_df) == True
|
|
||||||
|
|
||||||
# Invalid headers (missing required fields)
|
|
||||||
invalid_df = pd.DataFrame({
|
|
||||||
"id": ["TEST001"], # Wrong column name
|
|
||||||
"name": ["Test"]
|
|
||||||
})
|
|
||||||
|
|
||||||
assert self.processor._
|
|
||||||
Reference in New Issue
Block a user