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