def test_should_report_both_errors_and_warnings_negative():
 expected = [('cannot assign to None', 'None', (-1), Error), ('Variable a assigned before global declaration', 'global a', (-1), Warning)]
 code = 'None = 2\ndef foo():\n  a=2\n  global a'
 AssertError(AssertionError, AreEqual, expected, compile_file(code))

def test_should_report_both_errors_and_warnings_negative ( ) : expected = [ ( 'cannot assign to None' , 'None' , ( - 1 ) , Error ) , ( 'Variable a assigned before global declaration' , 'global a' , ( - 1 ) , Warning ) ] code = 'None = 2\ndef foo():\n  a=2\n  global a' AssertError ( AssertionError , AreEqual , expected , compile_file ( code ) )
bug #17541 .