Skip to content
Snippets Groups Projects
Commit dfaed077 authored by CHAMONT David's avatar CHAMONT David
Browse files

Mis au point des doctests.

parent 82c84045
No related branches found
No related tags found
1 merge request!64Reproduction de la structure mise au point dans CodeGuards
...@@ -50,5 +50,4 @@ test_sqlite: ...@@ -50,5 +50,4 @@ test_sqlite:
doctests: doctests:
stage: UnitTests stage: UnitTests
script: script:
- export LT_CFG=Voiture - test/scripts/run_doctest.sh
- test/scripts/doctests.sh
...@@ -209,16 +209,3 @@ def get_user_selection(number_of_mandatory_labels: int, optional1: str, optional ...@@ -209,16 +209,3 @@ def get_user_selection(number_of_mandatory_labels: int, optional1: str, optional
id_mandatory_labels = optional2 id_mandatory_labels = optional2
id_forbiden_labels = optional1 id_forbiden_labels = optional1
return id_mandatory_labels, id_forbiden_labels return id_mandatory_labels, id_forbiden_labels
if __name__ == "__main__":
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
import os
app = Flask(__name__)
app.config.from_object(os.environ['LABELSTOWER_ENV'])
bp.db = SQLAlchemy(app)
import doctest
doctest.testmod(verbose=True)
\ No newline at end of file
#!/usr/bin/env python3
import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///../instance/Voiture.sqlite'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
import labelstower
labelstower.bp.db = SQLAlchemy(app)
import doctest
doctest.testmod(labelstower.getter,verbose=True)
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
SCRIPT_NAME=${BASH_SOURCE[0]} SCRIPT_NAME=${BASH_SOURCE[0]}
cd `dirname ${SCRIPT_NAME}` cd `dirname ${SCRIPT_NAME}`
export LABELSTOWER_ENV="demo.config.Config${LT_CFG}" PWD=`pwd`
UP1=`dirname ${PWD}`
export PYTHONPATH=`dirname ${UP1}`
./run_doctest.py
cd ../..
python3 labelstower/getter.py
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment