def test_float_values(self): val = DS(0.9) assert isinstance(val, pydicom.valuerep.DSfloat) assert 0.9 == val val = DS("0.9") assert isinstance(val, pydicom.valuerep.DSfloat) assert 0.9 == val
def test_value(self): item = self._measurement[0] assert len(item.MeasuredValueSequence) == 1 assert len(item.MeasuredValueSequence[0]) == 3 assert item.MeasuredValueSequence[0].NumericValue == DS(self._value) value_item = item.MeasuredValueSequence[0] unit_item = value_item.MeasurementUnitsCodeSequence[0] assert unit_item == self._unit with pytest.raises(AttributeError): item.NumericValueQualifierCodeSequence
def test_empty_value(self): assert DS(None) is None assert "" == DS("")
def test_empty_value(self): assert '' == DS(None) assert '' == DS('')