def test_tointlistValidRange(self): out = machinestate.tointlist("1-3") self.assertEqual(out, [1, 2, 3])
def test_tointlistValidMixed(self): out = machinestate.tointlist("1-3,4") self.assertEqual(out, [1, 2, 3, 4])
def test_tointlistValidFloats(self): out = machinestate.tointlist("1.0 2.0 3.0") self.assertEqual(out, [1, 2, 3])
def test_tointlistValidComma(self): out = machinestate.tointlist("1,2,3") self.assertEqual(out, [1, 2, 3])
def test_tointlistValidTabs(self): out = machinestate.tointlist("1\t2\t3") self.assertEqual(out, [1, 2, 3])
def test_tointlistValidSpaces(self): out = machinestate.tointlist("1 2 3") self.assertEqual(out, [1, 2, 3])
def test_tointlistFloat(self): out = machinestate.tointlist(1.0) self.assertEqual(out, [1])
def test_tointlistInt(self): out = machinestate.tointlist(1) self.assertEqual(out, [1])
def test_tointlistNone(self): out = machinestate.tointlist(None) self.assertEqual(out, None)