Exemplo n.º 1
0
 def test_tohertzStrfgHz(self):
     out = machinestate.tohertz("1234.00gHz")
     self.assertEqual(out, 1234000000000)
Exemplo n.º 2
0
 def test_tohertzStrNotValid(self):
     out = machinestate.tohertz("abc")
     self.assertEqual(out, None)
Exemplo n.º 3
0
 def test_tohertzStrfhz(self):
     out = machinestate.tohertz("1234.00hz")
     self.assertEqual(out, 1234)
Exemplo n.º 4
0
 def test_tohertzFloatStr(self):
     # string without unit are seen as kHz
     out = machinestate.tohertz("10000.00")
     self.assertEqual(out, 10000000)
Exemplo n.º 5
0
 def test_tohertzFloat(self):
     out = machinestate.tohertz(1000.00)
     self.assertEqual(out, 1000)
Exemplo n.º 6
0
 def test_tohertzStrKHz(self):
     out = machinestate.tohertz("1234KHz")
     self.assertEqual(out, 1234*1000)
Exemplo n.º 7
0
 def test_tohertzNone(self):
     out = machinestate.tohertz(None)
     self.assertEqual(out, None)