Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #78308

Re: Syntax error in python unittest script

From Peter Otten <__peter__@web.de>
Subject Re: Syntax error in python unittest script
Date 2014-09-24 21:41 +0200
Organization None
References <2c76f6c8-bb13-44e9-8da8-62a08e067b3a@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.14329.1411587688.18130.python-list@python.org> (permalink)

Show all headers | View raw


Milson Munakami wrote:

>                 if self.reportStatus_:
>                         self.log.info("=== Test %s completed normally (%d sec)", self.name_, duration

The info() call is missing the closing parenthesis
 
>         def cleanup(self, success):
>                 sys.excepthook = sys.__excepthook__
> 

> It gives me errror   
> 
> File "TestTest.py", line 44
>     def cleanup(self, success):
>       ^
> SyntaxError: invalid syntax
 
To find a syntax error it is often a good idea to look into the code that 
precedes the line that the compiler complains about.

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Syntax error in python unittest script Milson Munakami <milsonmun@gmail.com> - 2014-09-24 12:33 -0700
  Re: Syntax error in python unittest script Emile van Sebille <emile@fenx.com> - 2014-09-24 12:40 -0700
  Re: Syntax error in python unittest script Peter Otten <__peter__@web.de> - 2014-09-24 21:41 +0200
  Re: Syntax error in python unittest script Milson Munakami <milsonmun@gmail.com> - 2014-09-24 13:06 -0700
    Re: Syntax error in python unittest script Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-09-24 21:28 +0100
  Re: Syntax error in python unittest script Terry Reedy <tjreedy@udel.edu> - 2014-09-24 17:39 -0400

csiph-web