Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added readme #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# pytest-read-json-example

This repository provides an example of how to read JSON data in Pytest using various methods. It demonstrates five different techniques to Read JSON Data in Pytest

## Requirements

- Python
- Pytest
- Black

## How to Run the Unit Tests

- Clone the GitHub repository:
```bash
git clone [https://github.com/ericsalesdeandrade/pytest-read-json-example.git](https://github.com/ericsalesdeandrade/pytest-read-json-example.git)
```

- Navigate to the project directory:
```bash
cd pytest-read-json-example
```
- Create a virtual environment, activate it and install the requirements:
``` bash
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```
To run the tests execute the following command
```bash
pytest tests/unit/test_read_json.py -v -s --input-json='{"name": "Ravi", "age": 90, "city": "New Delhi"}'
```