Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
clapper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
software
clapper
Commits
e83aef31
Commit
e83aef31
authored
2 years ago
by
Yannick DAYER
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Merge branch 'assert_click_runner_result' into 'master'"
This reverts merge request
!4
parent
6ab0b663
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!5
Revert "Merge branch 'assert_click_runner_result' into 'master'"
Pipeline
#66546
passed
2 years ago
Stage: qa
Stage: test
Stage: doc
Stage: dist
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/exposed/click.py
+0
-20
0 additions, 20 deletions
src/exposed/click.py
with
0 additions
and
20 deletions
src/exposed/click.py
+
0
−
20
View file @
e83aef31
...
@@ -8,7 +8,6 @@ import logging
...
@@ -8,7 +8,6 @@ import logging
import
pprint
import
pprint
import
shutil
import
shutil
import
time
import
time
import
traceback
import
typing
import
typing
from
importlib.metadata
import
EntryPoint
from
importlib.metadata
import
EntryPoint
...
@@ -869,22 +868,3 @@ def config_group(
...
@@ -869,22 +868,3 @@ def config_group(
return
group_wrapper
return
group_wrapper
return
group_decorator
return
group_decorator
def
assert_click_runner_result
(
result
,
exit_code
=
0
,
exception_type
=
None
):
"""
Helper for asserting click runner results.
"""
m
=
(
"
Click command exited with code `{}
'
and exception:
\n
{}
"
"
\n
The output was:
\n
{}
"
)
exception
=
(
"
None
"
if
result
.
exc_info
is
None
else
""
.
join
(
traceback
.
format_exception
(
*
result
.
exc_info
))
)
m
=
m
.
format
(
result
.
exit_code
,
exception
,
result
.
output
)
assert
result
.
exit_code
==
exit_code
,
m
if
exit_code
==
0
:
assert
not
result
.
exception
,
m
if
exception_type
is
not
None
:
assert
isinstance
(
result
.
exception
,
exception_type
),
m
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