'Simple tests of chaffing and winnowing'

def runTest(self):

    Chaffing.Chaff()
    Chaffing.Chaff(0.5, 1)
    self.assertRaises(ValueError, Chaffing.Chaff, factor=(-1))
    self.assertRaises(ValueError, Chaffing.Chaff, blocksper=(-1))
    data = [(1, 'data1', 'data1'), (2, 'data2', 'data2')]
    c = Chaffing.Chaff(1.0, 1)
    c.chaff(data)
    chaff = c.chaff(data)
    self.assertEqual(len(chaff), 4)
    c = Chaffing.Chaff(0.0, 1)
    chaff = c.chaff(data)
    self.assertEqual(len(chaff), 2)
