Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/collabnix/testcontainers-python
Testcontainers, Python and PyTest
https://github.com/collabnix/testcontainers-python
containers developers docker integration-testing test-automation testcontainers testing testing-tools
Last synced: 3 days ago
JSON representation
Testcontainers, Python and PyTest
- Host: GitHub
- URL: https://github.com/collabnix/testcontainers-python
- Owner: collabnix
- Created: 2024-08-16T05:13:04.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-16T06:35:36.000Z (3 months ago)
- Last Synced: 2024-10-12T06:14:29.825Z (about 1 month ago)
- Topics: containers, developers, docker, integration-testing, test-automation, testcontainers, testing, testing-tools
- Language: Python
- Homepage: https://collabnix.com/test-driven-development-with-python-testcontainers-and-pytest/
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Testcontainers, Python and PyTest
Test-Driven Development with Python, Testcontainers, and pytest
## Prereq
- Docker Desktop
## Clone the repository
```
git clone https://github.com/collabnix/testcontainers-python
cd testcontainers-python
```## Create a virtual environment
```shell
python3 -m venv .venv
```## Activate the virtual environment
```shell
source .venv/bin/activate
```## Upgrade pip
```shell
pip install --upgrade pip
```## Install the required packages
```shell
pip install psycopg
pip install pytest
pip install testcontainers
```## Freeze the requirements
```shell
pip freeze > requirements.txt
```## Running Tests
```shell
pytest
```To set this interpreter as the default for all new projects: