Skip to content

Commit d1edcc8

Browse files
author
marter11
committed
changed tests path and README
1 parent deb51c6 commit d1edcc8

File tree

11 files changed

+13
-14
lines changed

11 files changed

+13
-14
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ Your `.env` file should now look something like [example.env](https://github.com
4242

4343
### Testing
4444

45-
- to run multiple tests just specify the directory which contains them for example `pipenv run pytest src/tests`
45+
- to run multiple tests just specify the directory which contains them for example `pipenv run pytest tests/`
4646
- - this will run all the tests in the `tests` directory
47-
- if you want to run test cases only in a particular file, then just give the full file path `pipenv run pytest src/tests/example.py`
47+
- if you want to run test cases only in a particular file, then just give the full file path `pipenv run pytest tests/example.py`
4848

4949
## Milestones
5050
- [ ] build DB and endpoints with basic CRUD

src/tests/__init__.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

tests/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import os
2+
import sys
3+
4+
# todo: change this importing solution
5+
sys.path.insert(0, os.getcwd()+'/src')
6+
7+
from api import app
8+
from api.models import db
9+
from api.models import User, Project
10+
11+
sys.path.insert(0, os.getcwd()+'/tests')
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,6 @@
33
from os import environ
44
from tests import app, db
55

6-
"""
7-
todo: change this importing solution if the tests/ won't be under src/
8-
import sys
9-
import os
10-
sys.path.insert(0, os.getcwd()+'/src')
11-
import api
12-
sys.path.insert(0, os.getcwd()+'/tests')
13-
"""
14-
156
@pytest.fixture
167
def client():
178

0 commit comments

Comments
 (0)