A Python 3.12 project for working with JSON files and AWS services using boto3.
pipenv install --python 3.12
pipenv shellpython src/main.pyThis project follows Test-Driven Development practices.
pipenv run pytestpipenv run pytest -m unitRUN_INTEGRATION_TESTS=1 pipenv run pytest -m integrationpipenv run pytest -m "not integration"pipenv run pytest --cov=src --cov-report=term-missing- Unit tests (
@pytest.mark.unit): Fast tests using mocked AWS services via moto. Seetests/test_example.py. - Integration tests (
@pytest.mark.integration): Tests against real AWS services. Require valid AWS credentials andRUN_INTEGRATION_TESTS=1. Seetests/test_integration.py.
- Write a failing test first (
tests/test_*.py) - Run
pipenv run pytestto see it fail - Write minimal code to make it pass
- Refactor if needed
- Repeat
.
├── src/
│ ├── __init__.py
│ └── main.py
├── tests/
│ ├── __init__.py
│ ├── test_example.py # Unit tests
│ └── test_integration.py # Integration tests
├── pytest.ini
├── Pipfile
├── pyproject.toml
└── README.md
- boto3: AWS SDK for Python
- pytest: Testing framework
- pytest-cov: Coverage reporting
- moto: AWS service mocking for tests