Skip to content
GitLab
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
Oct 04, 2022
by
BO ZHANG
🏀
Browse files
added unit test for CsstStatus
parent
f2ae94cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
csst_common/status.py
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
)
tests/test_status.py
0 → 100644
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
)
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