lundi 8 mai 2017

How to prevent truncating of string in unit test python

I am doing a unit test in python for my program and I would like to do an assertEquals test.

My code looks something like this:

class UnitTest(unittest.TestCase):
      def test_parser(self):
          self.assertEquals(parser,"some long string", "String is not equal")

However, as my string is too long, i got something like testing[471 chars]0 != testing[473 chars]. I wanna see what is the exact difference between both the strings instead of seeing the truncated ones.

Anyone has an idea how to counter this problem ?

Aucun commentaire:

Enregistrer un commentaire