def testImportantMustBeBool(self): with self.assertRaises(ValueError): value.Value(None, 'x', 'unit', important='foo', description=None, tir_label=None)
def testUnitsMustBeString(self): with self.assertRaises(ValueError): value.Value(None, 'x', 42, important=False, description=None, tir_label=None)
def testInteractionRecordMustBeStringOrNone(self): with self.assertRaises(ValueError): value.Value(None, 'x', 'unit', important=False, description=None, tir_label=42)
def testDescriptionMustBeStringOrNone(self): with self.assertRaises(ValueError): value.Value(None, 'x', 'unit', important=False, description=42, tir_label=None)
def testGroupingKeysMustBeDictOrNone(self): with self.assertRaises(ValueError): value.Value(None, 'x', 'unit', important=False, description=None, tir_label=42, grouping_keys='foo')
def testNameMustBeString(self): with self.assertRaises(ValueError): value.Value(None, 42, 'unit', important=False, description=None, tir_label=None, grouping_keys=None)
def testIncompat(self): page0 = self.pages[0] a = value.Value(page0, 'x', 'unit', important=False, description=None) b = value.Value(page0, 'x', 'incompatUnit', important=False, description=None) self.assertFalse(b.IsMergableWith(a)) a = value.Value(page0, 'x', 'unit', important=False, description=None) b = value.Value(page0, 'x', 'unit', important=True, description=None) self.assertFalse(b.IsMergableWith(a)) a = value.Value(page0, 'x', 'unit', important=False, description=None) c = ValueForTest(page0, 'x', 'unit', important=True, description=None) self.assertFalse(c.IsMergableWith(a))