title: Doctest failed with zero exit code
body: <p>In my test code, my doctest fails but the script exits with a zero return value, which causes the CI run to pass, which is not intended.</p>
  
  <p>Is this the correct behavior of doctest module?</p>
  
  <p>My script ends with:</p>
  
  <pre><code>if __name__ == '__main__':
      import doctest
      doctest.testmod()
  </code></pre>
  
  <p>The output is like:</p>
  
  <pre><code>**********************************************************************
  File "test/test.py", line 7, in __main__
  Failed example:
      f(1,0)
  Expected:
      -----
      type: &lt;type 'exceptions.ZeroDivisionError'&gt;
      value: integer division or modulo by zero
      x
      -----
  Got:
      -----
      type: &lt;type 'exceptions.ZeroDivisionError'&gt;
      value: integer division or modulo by zero
      -----
  **********************************************************************
  1 items had failures:
     1 of   1 in __main__
  ***Test Failed*** 1 failures.
  tux@iPad:~/programming/exception-notifier(fix-travis)(0)$ echo $?
  0
  </code></pre>