Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Pulsar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
NDIP
Pulsar
Commits
1c291ea3
Commit
1c291ea3
authored
5 years ago
by
Nicola Soranzo
Browse files
Options
Downloads
Patches
Plain Diff
Fix deprecated ``assertEquals()``
See
https://docs.python.org/2/library/unittest.html#deprecated-aliases
parent
0a4476be
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/client_staging_test.py
+2
-2
2 additions, 2 deletions
test/client_staging_test.py
test/test_utils.py
+4
-4
4 additions, 4 deletions
test/test_utils.py
with
6 additions
and
6 deletions
test/client_staging_test.py
+
2
−
2
View file @
1c291ea3
...
...
@@ -61,7 +61,7 @@ class TestStager(TempDirectoryTestCase):
self
.
_submit
()
uploaded_file1
=
self
.
client
.
put_files
[
0
]
assert
uploaded_file1
[
1
]
==
"
tool
"
self
.
assertEqual
s
(
uploaded_file1
[
0
],
"
%s/tool1_wrapper.py
"
%
tool_dir
)
self
.
assertEqual
(
uploaded_file1
[
0
],
"
%s/tool1_wrapper.py
"
%
tool_dir
)
def
test_input_extra_rewrite
(
self
):
self
.
client_job_description
.
rewrite_paths
=
True
...
...
@@ -91,7 +91,7 @@ class TestStager(TempDirectoryTestCase):
self
.
_submit
()
uploaded_file1
=
self
.
client
.
put_files
[
0
]
assert
uploaded_file1
[
1
]
==
"
unstructured
"
self
.
assertEqual
s
(
uploaded_file1
[
0
],
local_unstructured_file
)
self
.
assertEqual
(
uploaded_file1
[
0
],
local_unstructured_file
)
def
test_submit_no_rewrite
(
self
):
# Expect no rewrite of paths
...
...
This diff is collapsed.
Click to expand it.
test/test_utils.py
+
4
−
4
View file @
1c291ea3
...
...
@@ -171,11 +171,11 @@ class BaseManagerTestCase(TestCase):
manager
.
launch
(
job_id
,
command
)
while
manager
.
get_status
(
job_id
)
not
in
[
'
complete
'
,
'
cancelled
'
]:
pass
self
.
assertEqual
s
(
manager
.
stderr_contents
(
job_id
),
b
'
moo
'
)
self
.
assertEqual
s
(
manager
.
stdout_contents
(
job_id
),
b
'
Hello World!
'
)
self
.
assertEqual
s
(
manager
.
return_code
(
job_id
),
0
)
self
.
assertEqual
(
manager
.
stderr_contents
(
job_id
),
b
'
moo
'
)
self
.
assertEqual
(
manager
.
stdout_contents
(
job_id
),
b
'
Hello World!
'
)
self
.
assertEqual
(
manager
.
return_code
(
job_id
),
0
)
manager
.
clean
(
job_id
)
self
.
assertEqual
s
(
len
(
listdir
(
self
.
staging_directory
)),
0
)
self
.
assertEqual
(
len
(
listdir
(
self
.
staging_directory
)),
0
)
def
_test_cancelling
(
self
,
manager
):
job_id
=
manager
.
setup_job
(
"
124
"
,
"
tool1
"
,
"
1.0.0
"
)
...
...
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