exasol / integration-test-docker-environment

A docker-based environment for integration tests with the EXASOL DB.
https://exasol.github.io/integration-test-docker-environment/
MIT License
6 stars 2 forks source link

Create context manager for api.spawn_test_environment #243

Open tomuben opened 2 years ago

tomuben commented 2 years ago

Background

In #235 we introduced a new API which allows clients to spawn a test environment from another python package. In #240 we extended the API so that it also returns the environment info and a cleanup method. It would be good to also provide a wrapper to clients which acts as a context manager so that the cleanup will be invoked automatically when exiting the context manager's scope.

Acceptance Criteria

Implement a context manager which wraps api.spawn_test_environment and cleans the database and test container automatically.