I have a project involving a number of AWS lambda functions where I want to run pytest at any level to execute the tests within the current directory and its subdirectories.
The structure is
/src
/lambda-one
lambda_handler.py
__init__.py
/test
test_lambda_handler.py
__init__.py
/group-a
/lambda-two
lambda_handler.py
__init__.py
/test
test_lambda_handler.py
__init__.py
/lambda-three
lambda_handler.py
__init__.py
/test
test_lambda_handler.py
__init__.py
/group-b
/lambda-four
lambda_handler.py
__init__.py
/test
test_lambda_handler.py
__init__.py
/lambda-five
lambda_handler.py
__init__.py
/test
test_lambda_handler.py
__init__.py
To run the tests I either have to change directory to the actual lambda or change my import paths to absolute paths from src.
Is there a way to have pytest run at each lambda level (without a shell script) so I can get a single set of results.