feat: Add comprehensive Python testing infrastructure with Poetry #65
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Add Python Testing Infrastructure
Summary
This PR sets up a comprehensive testing infrastructure for the awspx Python project using Poetry as the package manager and pytest as the testing framework.
Changes Made
Package Management
pyproject.tomlwith all project dependencies and development dependencieslibandscriptspackagesTesting Framework
unit,integration,slow)Project Structure
Testing Fixtures
Added comprehensive shared fixtures in
conftest.py:temp_dir- Temporary directory for test filesmock_boto3_client- Mock AWS client for testingmock_boto3_session- Mock AWS sessionmock_neo4j_driver- Mock Neo4j driver for graph database testingsample_aws_config- Sample AWS configurationsample_aws_resource- Sample AWS resource datareset_environment- Auto-reset environment variablesmock_console- Mock console for output testingmock_git_repo- Mock git repositoryDevelopment Commands
Configured Poetry scripts for running tests:
poetry run test- Run all tests with coveragepoetry run tests- Alternative command (both work identically)Both commands support all standard pytest options.
Additional Configuration
.gitignorewith:.pytest_cache/,.coverage,htmlcov/, etc.).claude/*)How to Use
Install Poetry (if not already installed):
curl -sSL https://install.python-poetry.org | python3 -Install dependencies:
Run tests:
View coverage report:
htmlcov/index.htmlin a browsercoverage.xmlNotes
pyproject.tomlNext Steps
With this testing infrastructure in place, developers can now:
@pytest.mark.slowmarker