Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
python_client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
Admin message
GitLab upgrade completed. Current version is 17.11.4.
Show more breadcrumbs
allgo
API-Clients
python_client
Commits
a58ba138
Commit
a58ba138
authored
5 years ago
by
LETORT Sebastien
Browse files
Options
Downloads
Patches
Plain Diff
Pep8 rules updated for tests.
parent
436fb669
No related branches found
No related tags found
2 merge requests
!4
Client api
,
!2
Continuous integration, more tests
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pytest.ini
+8
-0
8 additions, 0 deletions
pytest.ini
requirements.txt
+2
-0
2 additions, 0 deletions
requirements.txt
tests/test_allgo.py
+6
-5
6 additions, 5 deletions
tests/test_allgo.py
with
16 additions
and
5 deletions
pytest.ini
+
8
−
0
View file @
a58ba138
...
...
@@ -5,3 +5,11 @@ markers =
error:
test
when
an
error
occured
success:
test
output
on
successfull
request
dbg:
for
debug.
pep8:
workaround
for
https://bitbucket.org/pytest-dev/pytest-pep8/issues/23/
# spaces rules are disabled
pep8ignore
=
E201 E202 E203 E221 E231 E272
# developper are recommanded to use a max length = 80
# but as doctrings are quite longer, we allow up to 100.
pep8maxlinelength
=
100
This diff is collapsed.
Click to expand it.
requirements.txt
+
2
−
0
View file @
a58ba138
requests
pytest
pytest-cov
pytest-pep8
sphinx
nbsphinx
pandoc
This diff is collapsed.
Click to expand it.
tests/test_allgo.py
+
6
−
5
View file @
a58ba138
...
...
@@ -9,14 +9,15 @@ import tempfile
# not standard
import
pytest
# local import
import
allgo
# I need to modify constant
from
allgo
import
*
if
2
==
sys
.
version_info
.
major
:
from
mock
import
Mock
,
patch
else
:
from
unittest.mock
import
Mock
,
patch
# local import
import
allgo
# I need to modify constant
from
allgo
import
*
# ================================================
class
TestStatusError
:
...
...
@@ -405,7 +406,7 @@ def test_download_file__default(mock_get, client):
file_url
=
"
https://whatever.fr/
"
+
filename
filepath
=
client
.
download_file
(
file_url
)
assert
"
./
"
+
filename
==
filepath
assert
"
./
"
+
filename
==
filepath
content
=
""
with
open
(
filepath
,
"
r
"
)
as
file_out
:
...
...
@@ -547,7 +548,7 @@ def test_get_log__big(mock_get, mock_status, client):
for
c
in
alphabet
:
chunk
=
''
for
i
in
range
(
8
):
chunk
+=
c
*
10
+
"
\n
"
chunk
+=
c
*
10
+
"
\n
"
file_content
.
append
(
chunk
)
# file_content is 5 chunks of 8 lines each
# and each line is the same letter repeated 10 times.
...
...
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