# -*- coding: utf-8 -*-

import baseEmoji
import unittest
import random
import string

class baseEmojiTest(unittest.TestCase):
    def testEncodeDecodeInt(self):
      for i in range(100):
        test_int = random.getrandbits(128)
        encoded_string = baseEmoji.encode(test_int)
        decoded_int = baseEmoji.decode(encoded_string)
        self.assertEqual(test_int, decoded_int)

    def testEncodeDecodeString(self):
        for i in range(100):
            test_string = ''.join(random.choice(string.printable) for _ in range(random.randint(10,140)))
            encoded_string = baseEmoji.encodeStr(test_string)
            decoded_string = baseEmoji.decodeStr(encoded_string)
            self.assertEqual(test_string, decoded_string)


    def testEncodeDecodeStringWithSpacing(self):
        test_string = ''.join(random.choice(string.printable) for _ in range(random.randint(10,140)))
        encoded_string = baseEmoji.encodeStr(test_string," ")
        decoded_string = baseEmoji.decodeStr(encoded_string," ")
        self.assertEqual(test_string, decoded_string)

    def testEncodeDecodeIntWithSpacing(self):
        test_int = random.getrandbits(128)
        encoded_string = baseEmoji.encode(test_int," ")
        decoded_int = baseEmoji.decode(encoded_string," ")
        self.assertEqual(test_int, decoded_int)
@@ -378,18 +378,45 @@
 oded_int
+, %22Failed on %25d%22 %25 test_int
 )%0A
-
 %0A    def
@@ -764,16 +764,46 @@
 d_string
+, %22Failed on %25s%22 %25 test_string
 )%0A%0A%0A    
@@ -1128,16 +1128,46 @@
 d_string
+, %22Failed on %25s%22 %25 test_string
 )%0A%0A    d
@@ -1357,32 +1357,32 @@
 ded_string,%22 %22)%0A
-
         self.ass
@@ -1407,13 +1407,40 @@
  decoded_int
+, %22Failed on %25d%22 %25 test_int
 )

Add failure messages for debugging