def test_tohertzlistIntStrCommakHz(self): # string without unit are seen as kHz out = machinestate.tohertzlist("10000kHz,20000KHz,30000khz") self.assertEqual(out, [10000000, 20000000, 30000000])
def test_tohertzlistFloatStrSpacekHz(self): # string without unit are seen as kHz out = machinestate.tohertzlist("10000.00kHz 20000.00kHz 30000.00KHz") self.assertEqual(out, [10000000, 20000000, 30000000])
def test_tohertzlistIntStrSpace(self): # string without unit are seen as kHz out = machinestate.tohertzlist("10000 20000 30000") self.assertEqual(out, [10000000, 20000000, 30000000])
def test_tohertzlistFloatStrComma(self): # string without unit are seen as kHz out = machinestate.tohertzlist("10000.00,20000.00,30000.00") self.assertEqual(out, [10000000, 20000000, 30000000])
def test_tohertzlistInt(self): out = machinestate.tohertzlist(1000) self.assertEqual(out, [1000])
def test_tohertzlistNone(self): out = machinestate.tohertzlist(None) self.assertEqual(out, None)