def test_molecular_quantity_num_badval(): s = '(:type "number" :value -1)' lst = KQMLList.from_string(s) mq = tra_module.get_molecular_quantity(lst)
def test_molecular_quantity_qual(): s = '(:type "qualitative" :value "high")' lst = KQMLList.from_string(s) mq = tra_module.get_molecular_quantity(lst) assert mq.quant_type == 'qualitative' assert mq.value == 'high'
def test_molecular_quantity_num(): s = '(:type "number" :value 20000)' lst = KQMLList.from_string(s) mq = tra_module.get_molecular_quantity(lst) assert mq.quant_type == 'number' assert mq.value == 20000
def test_molecular_quantity_conc_badunit(): s = '(:type "concentration" :value 200 :unit "meter")' lst = KQMLList.from_string(s) mq = tra_module.get_molecular_quantity(lst)
def test_molecular_quantity_conc_badval(): s = '(:type "concentration" :value "xyz" :unit "nM")' lst = KQMLList.from_string(s) mq = tra_module.get_molecular_quantity(lst)
def test_molecular_quantity_conc2(): s = '(:type "concentration" :value 200 :unit "nM")' lst = KQMLList.from_string(s) mq = tra_module.get_molecular_quantity(lst) assert mq.quant_type == 'concentration' assert mq.value == 200 * units.nano * units.mol / units.liter
def test_molecular_quantity_qual_badval(): s = '(:type "qualitative" :value 123)' lst = KQMLList.from_string(s) mq = tra_module.get_molecular_quantity(lst)