'unittest.TestCase truncates output despite self.maxDiff = None

In my unittests I compare two lists of dicts, yet I can't see the output as it's always truncated:

AssertionError: {'Name': 'Δ', 'ID': 44, 'Transform': 'direct_jenkin[95 chars] 'Δ'} != {'Name': 'Data Pump', 'ID': 44, 'Transform': 'direc[107 chars]dge'}

Given the case that I would like to see where and how the dicts differ that's quite impractical.

This issue seems to be known: How to prevent truncating of string in unit test python

So my test-script looks like:

import unittest

class MainTests(unittest.TestCase):
    maxDiff = None

    def test_compareDBStateWithFile(self):
        self.maxDiff = None #Just in case as it didn't work with the previous one

        # Stuff

        self.assertDictEqual(x_state_sorted,objects_sorted)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source