forked from afourmy/pyTSP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from os import remove | ||
from os.path import abspath, dirname, join, pardir | ||
from pytest import fixture | ||
import sys | ||
|
||
path_test = dirname(abspath(__file__)) | ||
path_parent = abspath(join(path_test, pardir)) | ||
path_app = join(path_parent, 'source') | ||
if path_app not in sys.path: | ||
sys.path.append(path_app) | ||
|
||
from flask_app import create_app | ||
|
||
|
||
@fixture | ||
def client(): | ||
app, solver = create_app() | ||
client = app.test_client() | ||
with app.app_context(): | ||
yield client | ||
remove(join(path_test, 'database.db')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from models import City | ||
|
||
|
||
def test_pytsp(client): | ||
pass |