Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
funkwhale
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
wxcafé
funkwhale
Commits
4f15d3d2
Commit
4f15d3d2
authored
7 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Patches
Plain Diff
Fixed #19: now uses pytest as a testing framework
parent
e7c8cad6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitlab-ci.yml
+1
-2
1 addition, 2 deletions
.gitlab-ci.yml
api/pytest.ini
+5
-0
5 additions, 0 deletions
api/pytest.ini
api/requirements/test.txt
+4
-0
4 additions, 0 deletions
api/requirements/test.txt
api/runtests
+1
-1
1 addition, 1 deletion
api/runtests
api/test.yml
+1
-3
1 addition, 3 deletions
api/test.yml
with
12 additions
and
6 deletions
.gitlab-ci.yml
+
1
−
2
View file @
4f15d3d2
...
...
@@ -9,8 +9,7 @@ test_api:
-
cd api
-
pip install -r requirements/test.txt
script
:
-
export DJANGO_SETTINGS_MODULE=config.settings.test
-
python manage.py test
-
pytest
tags
:
-
docker
...
...
This diff is collapsed.
Click to expand it.
api/pytest.ini
0 → 100644
+
5
−
0
View file @
4f15d3d2
[pytest]
DJANGO_SETTINGS_MODULE
=
config.settings.test
# -- recommended but optional:
python_files
=
tests.py test_*.py *_tests.py
This diff is collapsed.
Click to expand it.
api/requirements/test.txt
+
4
−
0
View file @
4f15d3d2
...
...
@@ -5,3 +5,7 @@
flake8==2.5.0
model-mommy==1.3.2
tox==2.7.0
pytest
pytest-django
pytest-sugar
pytest-xdist
This diff is collapsed.
Click to expand it.
api/runtests
+
1
−
1
View file @
4f15d3d2
...
...
@@ -2,4 +2,4 @@
DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
docker-compose
-f
$DIR
/test.yml run
test
py
thon manage.py
test
"
$@
"
docker-compose
-f
$DIR
/test.yml run
test
pytest
"
$@
"
This diff is collapsed.
Click to expand it.
api/test.yml
+
1
−
3
View file @
4f15d3d2
test
:
dockerfile
:
docker/Dockerfile.test
build
:
.
command
:
py
thon manage.py
test
command
:
pytest
volumes
:
-
.:/app
environment
:
-
DJANGO_SETTINGS_MODULE=config.settings.test
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