Skip to content

Commit ec4b4d6

Browse files
arthansonjeremystretch
authored andcommitted
681 update readme with instructions for runnnig tests
1 parent 83be70c commit ec4b4d6

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Diff for: README.md

+22
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,28 @@ nb = pynetbox.api(
7171
)
7272
```
7373

74+
## Running Tests
75+
76+
First, create and activate a Python virtual environment in the pynetbox directory to isolate the project dependencies:
77+
78+
```python
79+
python3 -m venv venv
80+
source venv/bin/activate
81+
```
82+
83+
Install both requirements files:
84+
85+
```python
86+
pip install -r requirements.txt
87+
pip install -r requirements-dev.txt
88+
```
89+
90+
Run pytest:
91+
92+
```python
93+
pytest
94+
```
95+
7496
## Alternative Library
7597

7698
> **Note:** For those interested in a different approach, there is an alternative Python API client library available for NetBox called [netbox-python](https://github.com/netbox-community/netbox-python). This library provides a thin Python wrapper over the NetBox API.

0 commit comments

Comments
 (0)