コード例 #1
0
 def testGetDigitsInOrderOf5BandResistor(self):
     self.assertEquals(
         123,
         decodeSignificantFigures(
             ["brown", "red", "orange", "green", "violet"]))
コード例 #2
0
 def testGetDigitsWithLeadingBlackBand4Bands(self):
     self.assertEquals(
         2, decodeSignificantFigures(["black", "red", "green", "violet"]))
コード例 #3
0
 def testGetDigitsWithBlackBand5Bands(self):
     self.assertEquals(
         200,
         decodeSignificantFigures(
             ["red", "black", "black", "green", "violet"]))
コード例 #4
0
 def testGetDigitsInReverseOrderOf4BandResistor(self):
     self.assertEquals(
         65, decodeSignificantFigures(["blue", "green", "green", "violet"]))