title: Python unittest list comparison repr problem
body: <p>Im writing some tests for more my python application for a company and now got stuck with the following problem:</p>
  
  <p>I need to compare two list of lists and I always get a an error when converting the second automatically generated list: TypeError: <strong>repr</strong> returned non-string (type dict). Which means the list I'm trying to compare with <code>self.assertListEqual(l1, l2)</code> contains a sub list again, I already checked the structure and I'm always getting the same result: there is no sub list in the list, I have printed everything, evaluated the content multiply times and still getting the same error, now I'm a bit stuck and don't know if how to proceed further. This is the code I used to generate the list which is correct and should be structural the same as the list the function generates:</p>
  
  <pre><code>        expected.append([])
          expected[0].append(openers[0])
          expected[0].extend(locks[0:5])
  
          expected.append([])
          expected[1].append(openers[1])
          expected[1].extend(locks[6:10])
  
          expected.append([other])
  </code></pre>
  
  <p>And this hard coded list is than compared to a dynamically created list which should be exactly the same</p>
  
  <p>Thanks for any help, if more cod is required I will append it here</p>