Commit 7f3355b1 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

added unit test for CsstStatus

parent f2ae94cc
...@@ -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)
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)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment