title: Handling assertion in python
body: <p>I can't understand why this code:</p>
  
  <pre><code>x='aaaa'
  try: 
      self.assertTrue(x==y)
  except: 
      print (x)
  </code></pre>
  
  <p>generates me this error</p>
  
  <pre><code>AssertionError: False is not True
  </code></pre>
  
  <p>It should be handle it by</p>
  
  <pre><code>print(x)
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>original code is:</p>
  
  <pre><code>try:
      self.assertTrue('aaaa'==self.compare_object_name[1])
  except:
      print ('aaa')
  </code></pre>
  
  <p>@Space_C0wb0y I can't give you full code because it is not my code, and I don't have a permission.</p>