#NEWLINE# def test_errors_when_expected_tests_differs_from_actual( self ) : #NEWLINE# #INDENT# plan = self . factory . make_plan ( expected_tests = 42 ) #NEWLINE# rules = self . _make_one ( ) #NEWLINE# rules . saw_plan ( rules , 1 ) #NEWLINE# rules . saw_test ( ) #NEWLINE# rules . check ( 2 ) #NEWLINE# self . assertEqual ( _ ( 'Expected {expected_count} tests but only {seen_count} ran.' ) . format ( expected_count = 42 , seen_count = 1 ) , self . suite . _tests [ 0 ] . _line . description )