Skip to content
Snippets Groups Projects
Commit b8ccf5fb authored by Stefano Borini's avatar Stefano Borini
Browse files

Added test for data value

parent 35bae43e
No related branches found
No related tags found
1 merge request!68Introduced data value object
from traits.api import HasStrictTraits, Any, String, Int
from traits.api import HasStrictTraits, Any, String, Int, Enum
class DataValue(HasStrictTraits):
......@@ -16,9 +16,11 @@ class DataValue(HasStrictTraits):
#: The value.
value = Any()
# The numerical accuracy of the value.
accuracy = Any()
quality = Int()
#: A flag for the quality of the data.
quality = Enum("AVERAGE", "POOR", "GOOD")
def __str__(self):
return """
......
import unittest
from force_bdss.core.data_value import DataValue
class TestDataValue(unittest.TestCase):
def test_initialization(self):
dv = DataValue()
self.assertEqual(dv.type, "")
self.assertEqual(dv.value, None)
self.assertEqual(dv.accuracy, None)
self.assertEqual(dv.quality, "AVERAGE")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment