Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
satella
Manage
Activity
Members
Labels
Plan
Issues
1
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
Package Registry
Container 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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public
satella
Commits
85f7ffea
Commit
85f7ffea
authored
4 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
it is possible to create `CodedCustomException` without an argument
parent
a8c30a08
No related branches found
Branches containing commit
Tags
v2.14.31
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.md
+2
-0
2 additions, 0 deletions
CHANGELOG.md
satella/__init__.py
+1
-1
1 addition, 1 deletion
satella/__init__.py
satella/exceptions.py
+1
-1
1 addition, 1 deletion
satella/exceptions.py
tests/test_exceptions.py
+3
-1
3 additions, 1 deletion
tests/test_exceptions.py
with
7 additions
and
3 deletions
CHANGELOG.md
+
2
−
0
View file @
85f7ffea
...
...
@@ -3,3 +3,5 @@
*
added
`sleep_interval`
to
`hang_until_sig`
*
added
`read_lines`
*
changed
`ImpossibleError`
to be a
`BaseException`
*
it is possible to create
`CodedCustomException`
without an argument
This diff is collapsed.
Click to expand it.
satella/__init__.py
+
1
−
1
View file @
85f7ffea
__version__
=
'
2.14.31
a5
'
__version__
=
'
2.14.31
'
This diff is collapsed.
Click to expand it.
satella/exceptions.py
+
1
−
1
View file @
85f7ffea
...
...
@@ -123,7 +123,7 @@ class CodedCustomException(CustomException, metaclass=CodedCustomExceptionMetacl
>>>
assert
not
isinstance
(
a
,
MyCode5Diff
)
"""
def
__init__
(
self
,
message
,
code
=
None
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
message
=
''
,
code
=
None
,
*
args
,
**
kwargs
):
super
().
__init__
(
message
,
code
,
*
args
,
**
kwargs
)
self
.
message
=
message
# type: str
if
code
is
not
None
:
...
...
This diff is collapsed.
Click to expand it.
tests/test_exceptions.py
+
3
−
1
View file @
85f7ffea
...
...
@@ -2,10 +2,12 @@ import unittest
from
satella.exceptions
import
BaseSatellaError
,
CustomException
,
CodedCustomException
,
\
ImpossibleError
ImpossibleError
,
CodedCustomException
class
TestExceptions
(
unittest
.
TestCase
):
def
test_coded_custom_exception_no_args
(
self
):
CodedCustomException
()
def
test_impossible_error
(
self
):
try
:
...
...
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