def testGetMethods(self):
    """
    Test that the getWidth, getDescription, and getDecoderOutputFieldTypes
    methods work.
    """
    enc = RandomDistributedScalarEncoder(name='theName', resolution=1.0, n=500)
    self.assertEqual(enc.getWidth(), 500,
                     "getWidth doesn't return the correct result")

    self.assertEqual(enc.getDescription(), [('theName', 0)],
                     "getDescription doesn't return the correct result")

    self.assertEqual(enc.getDecoderOutputFieldTypes(),
                (FieldMetaType.float, ),
                "getDecoderOutputFieldTypes doesn't return the correct result")
  def testGetMethods(self):
    """
    Test that the getWidth, getDescription, and getDecoderOutputFieldTypes
    methods work.
    """
    encoder = RandomDistributedScalarEncoder(name="theName", resolution=1.0, n=500)
    self.assertEqual(encoder.getWidth(), 500,
                     "getWidth doesn't return the correct result")

    self.assertEqual(encoder.getDescription(), [("theName", 0)],
                     "getDescription doesn't return the correct result")

    self.assertEqual(encoder.getDecoderOutputFieldTypes(),
                     (FieldMetaType.float, ),
                     "getDecoderOutputFieldTypes doesn't return the correct"
                     " result")