Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
LabelsTower
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MaitresNageurs
README
LabelsTower
Commits
dfaed077
Commit
dfaed077
authored
4 years ago
by
CHAMONT David
Browse files
Options
Downloads
Patches
Plain Diff
Mis au point des doctests.
parent
82c84045
No related branches found
No related tags found
1 merge request
!64
Reproduction de la structure mise au point dans CodeGuards
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+1
-2
1 addition, 2 deletions
.gitlab-ci.yml
labelstower/getter.py
+0
-13
0 additions, 13 deletions
labelstower/getter.py
test/scripts/run_doctest.py
+15
-0
15 additions, 0 deletions
test/scripts/run_doctest.py
test/scripts/run_doctest.sh
+5
-3
5 additions, 3 deletions
test/scripts/run_doctest.sh
with
21 additions
and
18 deletions
.gitlab-ci.yml
+
1
−
2
View file @
dfaed077
...
@@ -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
This diff is collapsed.
Click to expand it.
labelstower/getter.py
+
0
−
13
View file @
dfaed077
...
@@ -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
This diff is collapsed.
Click to expand it.
test/scripts/run_doctest.py
0 → 100755
+
15
−
0
View file @
dfaed077
#!/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
)
This diff is collapsed.
Click to expand it.
test/scripts/doctest
s
.sh
→
test/scripts/
run_
doctest.sh
+
5
−
3
View file @
dfaed077
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment