~mcfletch/simpleparse/pure-python

« back to all changes in this revision

Viewing changes to tests/test_erroronfail.py

  • Committer: Mike C. Fletcher
  • Date: 2011-09-06 20:51:03 UTC
  • Revision ID: mcfletch@vrplumber.com-20110906205103-h4h8jxu79yyed48c
Make simpleparse-pure test suite pass with no errors or warnings on Python 2.6, 2.7 and 3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
class ErrorOnFailTests( unittest.TestCase ):
6
6
    """Tests of the error-on failure mechanisms"""
7
7
    def shouldRaise(self, definition, parserName, testValue, ):
8
 
        self.failUnlessRaises( ParserSyntaxError,  Parser( definition).parse, testValue, parserName )
 
8
        self.assertRaises( ParserSyntaxError,  Parser( definition).parse, testValue, parserName )
9
9
    def shouldNotRaise(self, definition, parserName, testValue, ):
10
10
        success,result, next = Parser( definition).parse( testValue, parserName )
11
11
        assert success, """Didn't parse %s (error on fail test for definition %s)"""%( repr(testValue), repr(definition))