title: test that list contain the same types of "objects" python unittest
body: <p>I have a test that checks the return value of a function, the problem is that the function returns a list of tuples, where each tuple contains an integer and an object.</p>
  
  <p>The object has floating point attributes so I want to use assertAlmostEqual there but something akin to "assertSameStructure" on the list.</p>
  
  <p>So in pseudo-code what I want to do:</p>
  
  <pre><code>import unittest
  class Test(unittest.TestCase):
      def test_foo(self):
          result = foo(data)
          expected_obj = Bar(23.3,12.1)
          self.assertSameStructure([0,expected_obj],result)
          self.assertAlmostEquals(expected_obj,result[0][1])
  </code></pre>