https://github.com/testcontainers/tc-guide-getting-started-with-testcontainers-for-python
Getting started with Testcontainers for Java guide
https://github.com/testcontainers/tc-guide-getting-started-with-testcontainers-for-python
Last synced: 3 months ago
JSON representation
Getting started with Testcontainers for Java guide
- Host: GitHub
- URL: https://github.com/testcontainers/tc-guide-getting-started-with-testcontainers-for-python
- Owner: testcontainers
- License: mit
- Created: 2023-12-05T03:14:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-28T01:30:44.000Z (about 1 year ago)
- Last Synced: 2024-05-22T17:24:44.203Z (about 1 year ago)
- Language: Python
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Getting started with Testcontainers for Python
This is sample code for [Getting started with Testcontainers for Python](https://testcontainers.com/guides/getting-started-with-testcontainers-for-python) guide.
## 1. Setup Environment
* Make sure you have a [compatible Docker environment](https://www.testcontainers.org/supported_docker_environment/) installed.
* Python 3.12+ installed.For example:
```shell
$ python --version
Python 3.12.0
```## 2. Setup Project
* Clone the repository
```shell
git clone https://github.com/testcontainers/tc-guide-getting-started-with-testcontainers-for-python.git
cd tc-guide-getting-started-with-testcontainers-for-python
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```* Open the **tc-guide-getting-started-with-testcontainers-for-python** project in your favorite IDE.
## 3. Run Tests
Run the command to run the tests.
```shell
$ pytest
```The tests should pass.