Skip to content

collabnix/testcontainers-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

python3 -m venv .venv

Activate the virtual environment

source .venv/bin/activate

Upgrade pip

pip install --upgrade pip

Install the required packages

pip install psycopg
pip install pytest
pip install testcontainers

Freeze the requirements

pip freeze > requirements.txt

Running Tests

pytest

To set this interpreter as the default for all new projects: