title: Fail Test Case if Exception is Raised and Handled in Python?
body: <p>Take a look at the following test case:</p>
  
  <pre><code>def test_1_check_version(self):
      try:
          self.version()
          print('\n')
      except cx_Oracle.DatabaseError as error_message:
          print("Sorry Connection could not be established because "+str(error_message))
  </code></pre>
  
  <p>Above is the test case of many test cases I am writing in Unittest of Python, and now I am running it to check that connection of the database is connected or not.</p>
  
  <p>If yes, then it will pass 'Version number of Database'.</p>
  
  <p>If not, then it will throw an exception, which I have handled.</p>
  
  <p>After running this rest case, the test case is showing pass in any testing framework (Robot, unittest, pytest) that I have used.</p>
  
  <p>But, I want this test case to fail because it is not the result I am looking for.</p>
  
  <p>Handling exceptions because I want to see the only error message rather than all those red lines of exception.</p>
  
  <p>I am open for any kind of suggestion, whether it involves removing exceptions.</p>