Unit test cases for Object intraction using mox/unittest

2013-03-08 Thread jitendra gupta
Hi I need to write the unit test cases for similary kind of sitution. I need to write the unit test case for Foo.testCall. for both case true or false. I am unalbe to do that. kindly please help me on this. as function is not returning any thing. from google i got mox is good for this case. but

Unit Test case for complie/test

2013-02-22 Thread jitendra gupta
Hi, I am working one tool, which will do compile/run the workspace (that code is written on c/c++). on that my requirment is i need to compile subfolder also, i have wrote code for that also. My problem is , i am unable to write the Unit test case for that. Since my method (called

Re: A trivial question

2011-09-29 Thread jitendra gupta
HI The class Foo you have defined is local NameSpace for trial functioon, for details http://docs.python.org/tutorial/classes.html def trial(): class Foo(object): def __init__(self): print(Hello, world!) lacalClass = Foo() trial Hello, world! Thanks Jitendra On Thu, Sep 29, 2011 at 3:19

Behavior of default parameter in a function

2010-03-11 Thread jitendra gupta
def foo(x = [0]): x[0] = x[0] + 1 return x[0] def soo(x = None): if x is None: x = [0] x[0] = x[0] + 1 return x[0] foo() 1 foo() #See the behavior incremented by one 2 foo([1]) # but here based on given number 2 foo() 3 foo([1]) 2 foo() 4 soo() 1 soo() 1 soo([1]) 2 soo() 1 Why foo() is

Re: NEWB: dividing numbers

2009-03-08 Thread jitendra gupta
try any one 1) from __future__ import division 2/3 -1/3 0.1 2) x = 2/3.0 x - 1/3.0 0.1 On Mon, Mar 9, 2009 at 9:33 AM, Daniel Dalton d.dal...@iinet.net.au wrote: Hi, On Mon, Mar 09, 2009 at 12:08:16AM +0100, Lo wrote: I just tried python first time. 2/3

email varification using smtplib or any method

2009-02-20 Thread jitendra gupta
hello here is my code for sending the mail, using this code email is going 'CODE '' import smtplib from time import strftime from email.mime.multipart