Re: Syntax error in python unittest script

2014-09-24 Thread Terry Reedy
On 9/24/2014 3:33 PM, Milson Munakami wrote: I am learning to use unittest with python [way too long example] File "TestTest.py", line 44 def cleanup(self, success): ^ SyntaxError: invalid syntax A common recommendation is to find the *minimal* example that exhibits the proble

Re: Syntax error in python unittest script

2014-09-24 Thread Mark Lawrence
On 24/09/2014 21:06, Milson Munakami wrote: [snipped all the usual garbage] Would you please access this list via https://mail.python.org/mailman/listinfo/python-list or read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing double line spacing and single li

Re: Syntax error in python unittest script

2014-09-24 Thread Milson Munakami
On Wednesday, September 24, 2014 1:33:35 PM UTC-6, Milson Munakami wrote: > Hi, > > > > I am learning to use unittest with python and walkthrough with this example > > http://agiletesting.blogspot.com/2005/01/python-unit-testing-part-1-unittest.html > > > Thanks > so my test script is like th

Re: Syntax error in python unittest script

2014-09-24 Thread Peter Otten
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 =

Re: Syntax error in python unittest script

2014-09-24 Thread Emile van Sebille
On 9/24/2014 12:33 PM, Milson Munakami wrote: def tearDown(self): if self.failed: return duration = time.time() - self.startTime_ self.cleanup(True) if self.reportStatus_: self.

Syntax error in python unittest script

2014-09-24 Thread Milson Munakami
Hi, I am learning to use unittest with python and walkthrough with this example http://agiletesting.blogspot.com/2005/01/python-unit-testing-part-1-unittest.html so my test script is like this: import json import urllib #import time #from util import * import httplib #import sys #from scapy.all i

Re: syntax error in python

2008-02-20 Thread Tim Roberts
Lalit <[EMAIL PROTECTED]> wrote: >Hi >I am executing following commands. test = os.path.isfile('c:\\src\\kasjdfl.txt') print test >True >working fine but for below statement it is giving syntax >error. > if (os.path.isfile('c:\\src\\kasjdfl.txt')) >SyntaxError: invalid s

Re: syntax error in python

2008-02-20 Thread Lalit
On Feb 20, 2:03 pm, Lalit <[EMAIL PROTECTED]> wrote: > Hi > I am executing following commands.>>> test = > os.path.isfile('c:\\src\\kasjdfl.txt') > >>> print test > > True > working fine but for below statement it is giving syntax > error. > > >>> if (os.path.isfile('c:\\src\\kasjdfl.t

syntax error in python

2008-02-20 Thread Lalit
Hi I am executing following commands. >>> test = os.path.isfile('c:\\src\\kasjdfl.txt') >>> print test True working fine but for below statement it is giving syntax error. >>> if (os.path.isfile('c:\\src\\kasjdfl.txt')) SyntaxError: invalid syntax any idea what is incorrect in my synt