def testLongAsDouble(self):
     '''Float as double'''
     self.check_value(l(42), 42, sample.acceptDouble, float)
 def testLongAsUInt(self):
     '''Long as unsigned Int'''
     self.check_value(l(260), 260, sample.acceptUInt, long)
     self.assertRaises(OverflowError, sample.acceptUInt, -42)
 def testLongAsULong(self):
     '''Long as unsigned Long'''
     self.check_value(l(128), 128, sample.acceptULong, long)
     self.assertRaises(OverflowError, sample.acceptULong, l(-334))
 def testLongAsInt(self):
     '''Long as Int'''
     self.check_value(l(24224), 24224, sample.acceptInt, int)
     self.assertRaises(OverflowError, sample.acceptInt, cIntMax + 20)
 def testLongAsLong(self):
     '''Long as Long'''
     self.check_value(l(2405), 2405, sample.acceptLong, int)
     self.assertRaises(OverflowError, sample.acceptLong, cLongMax + 20)
 def testLongAsDouble(self):
     '''Float as double'''
     self.check_value(l(42), 42, sample.acceptDouble, float)
 def testLongAsULong(self):
     '''Long as unsigned Long'''
     self.check_value(l(128), 128, sample.acceptULong, long)
     self.assertRaises(OverflowError, sample.acceptULong, l(-334))
 def testLongAsUInt(self):
     '''Long as unsigned Int'''
     self.check_value(l(260), 260, sample.acceptUInt, long)
     self.assertRaises(OverflowError, sample.acceptUInt, -42)
 def testLongAsLong(self):
     '''Long as Long'''
     self.check_value(l(2405), 2405, sample.acceptLong, int)
     self.assertRaises(OverflowError, sample.acceptLong, sys.maxint + 20)
 def testLongAsInt(self):
     '''Long as Int'''
     self.check_value(l(24224), 24224, sample.acceptInt, int)
     self.assertRaises(OverflowError, sample.acceptInt, sys.maxint + 20)