0

I am very new in this forum. So please let me know if I am not asking question in right format, etc.

I am basically trying to follow along documentation for mock module in python http://www.voidspace.org.uk/downloads/mock-1.0.1.pdf

But if I do the following I get an error. any help? I am using python 2.7.3

>>> from mock import Mock
>>> mock = Mock()
>>> mock.method(1, 2, 3, test=’wow’)
 File "<stdin>", line 1
 mock.method(1, 2, 3, test=’wow’)
 SyntaxError: invalid syntax

If I do not use the KWARGS it works.

miku
189k47 gold badges314 silver badges317 bronze badges
asked Oct 24, 2013 at 15:19

1 Answer 1

2

Try using ' instead of

mock.method(1, 2, 3, test='wow')
answered Oct 24, 2013 at 15:34
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. It works. I did cut and paste from pdf document, and that messed up. Thanks a lot again Pablo.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.