title: assert_raises() from nose tools doesn't really work
body: <p>Ok, here is the problem: in <a href="http://learnpythonthehardway.org/book/ex49.html" rel="nofollow">exercise 49</a> of "Learn Python the Hard Way" by Zed Shaw, we need to test a couple of exceptions with <code>assert_raises()</code>. Here is the function, that I'm testing and if omitting the <code>assert_raises()</code> part, it passes the test:</p>
  
  <pre><code>def parse_verb(word_list):
      skip(word_list, 'stop')
  
      if peek(word_list) == 'verb':
          return match(word_list, 'verb')
      else:
          raise ParserError("Expected a verb next.")
  </code></pre>
  
  <p>Here is the test function and the infamous <code>assert_raises()</code> line:</p>
  
  <pre><code>def parse_verb_test():
      vrb_list = [('of', 'stop'), ('from', 'stop'), ('go', 'verb'), ('north', 'direction')]
      assert_equal(parse_verb(vrb_list), ('go', 'verb'))
      assert_equal(vrb_list, [('north', 'direction')])
      assert_raises(ParserError, parse_verb, vrb_list)
  </code></pre>
  
  <p>And it gives me the following output:</p>
  
  <pre><code>.........E...
  ======================================================================
  ERROR: tests.parser_tests.parse_verb_test
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
      self.test(*self.arg)
    File "/Users/vsevolod/Repositories/ex48/tests/parser_tests.py", line 20, in parse_verb_test
      assert_raises(ParserError, parse_verb, vrb_list)
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 471, in assertRaises
      callableObj(*args, **kwargs)
    File "/Users/vsevolod/Repositories/ex48/ex48/parser.py", line 40, in parse_verb
      raise ParserError("Expected a verb next.")
  TypeError: object.__new__() takes no parameters
  
  ----------------------------------------------------------------------
  Ran 13 tests in 0.042s
  
  FAILED (errors=1)
  </code></pre>
  
  <p>I also tried getting rid of the <code>assert_raises()</code> line and using the <code>@raises(ParserError)</code> before the function. It also didn't quite work and resulted in the same output.</p>
  
  <p>Creating a separate test like this helped to get rid of the error:</p>
  
  <pre><code>def parse_verb_fail():
      fail_list = [('north', 'direction'), ('go', 'verb')]
      assert_raises(ParserError, parse_verb, fail_list)
  </code></pre>
  
  <p>But now the test is simply ignored.</p>
  
  <p>What am I doing wrong?</p>