Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
csst_common
Commits
7f3355b1
Commit
7f3355b1
authored
2 years ago
by
BO ZHANG
Browse files
Options
Download
Email Patches
Plain Diff
added unit test for CsstStatus
parent
f2ae94cc
dev
main
wangxia-main-patch-87026
zhaobowei-main-patch-61353
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
csst_common/status.py
+0
-7
csst_common/status.py
tests/test_status.py
+9
-0
tests/test_status.py
with
9 additions
and
7 deletions
+9
-7
csst_common/status.py
+
0
-
7
View file @
7f3355b1
...
@@ -19,10 +19,3 @@ class CsstStatus(IntEnum):
...
@@ -19,10 +19,3 @@ class CsstStatus(IntEnum):
# def __repr__(self):
# def __repr__(self):
# return '<%s.%s>' % (self.__class__.__name__, self.name)
# return '<%s.%s>' % (self.__class__.__name__, self.name)
if
__name__
==
"__main__"
:
print
(
CsstStatus
)
print
(
CsstStatus
.
PROBLEMATIC
)
print
(
CsstStatus
(
1
))
print
(
CsstStatus
(
1
)
==
CsstStatus
.
PROBLEMATIC
)
This diff is collapsed.
Click to expand it.
tests/test_status.py
0 → 100644
+
9
-
0
View file @
7f3355b1
import
unittest
from
csst_common.status
import
CsstStatus
class
TestParams
(
unittest
.
TestCase
):
def
test_params
(
self
):
self
.
assertTrue
(
CsstStatus
(
0
)
==
CsstStatus
.
PERFECT
)
self
.
assertTrue
(
CsstStatus
(
1
)
==
CsstStatus
.
WARNING
)
self
.
assertTrue
(
CsstStatus
(
2
)
==
CsstStatus
.
ERROR
)
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets