Skip to content
Snippets Groups Projects
Commit d5ac66c9 authored by fuzzyman's avatar fuzzyman
Browse files

Tests and docs updates.

parent f4a309f3
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,8 @@ Not considered:
* Interaction of magic methods with spec, wraps. Should spec cause all methods to be wrapped with mocksignature perhaps?
* Documenting mocking __enter__ and __exit__
* Should magic method calls be tracked in method_calls?
* Test mocksignature argument to patch
* Test deleting magic methods
2009/08/22 Version 0.6.0
......
......@@ -36,7 +36,7 @@ master_doc = 'index'
# General substitutions.
project = u'Mock'
copyright = u'2009, Michael Foord'
copyright = u'2009-2010, Michael Foord'
# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
......
......@@ -3,8 +3,8 @@
====================================
:Author: `Michael Foord <http://www.voidspace.org.uk/python/weblog/index.shtml>`_
:Version: Mock 0.6.0
:Date: 2009/08/22
:Version: Mock 0.7.0
:Date: 2010/01/XX
:Homepage: `Mock Homepage`_
:Documentation: `PDF Documentation <http://www.voidspace.org.uk/downloads/mock.pdf>`_
:License: `BSD License`_
......
#! /usr/bin/python
# Copyright (C) 2007-2009 Michael Foord
# Copyright (C) 2007-2010 Michael Foord
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
......
# Copyright (C) 2007-2009 Michael Foord
# Copyright (C) 2007-2010 Michael Foord
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
......
# Copyright (C) 2007-2009 Michael Foord
# Copyright (C) 2007-2010 Michael Foord
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
# Copyright (C) 2007-2009 Michael Foord
# Copyright (C) 2007-2010 Michael Foord
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
......@@ -42,7 +42,10 @@ class MockTest(TestCase):
self.assertNone(mock._parent, "parent not initialised correctly")
self.assertNone(mock._methods, "methods not initialised correctly")
self.assertEquals(mock._children, {}, "children not initialised incorrectly")
def testUnicodeNotBroken(self):
# This used to raise an exception with Python 2.5 and Mock 0.4
unicode(Mock())
def testReturnValueInConstructor(self):
mock = Mock(return_value=None)
......
# Copyright (C) 2007-2009 Michael Foord
# Copyright (C) 2007-2010 Michael Foord
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
......
# Copyright (C) 2007-2009 Michael Foord
# Copyright (C) 2007-20010 Michael Foord
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
......@@ -26,7 +26,10 @@ class SentinelTest(TestCase):
def testDEFAULT(self):
self.assertTrue(DEFAULT is sentinel.DEFAULT)
def testBases(self):
# If this doesn't raise an AttributeError then help(mock) is broken
self.assertRaises(AttributeError, lambda: sentinel.__bases__)
if __name__ == '__main__':
......
# Copyright (C) 2007-2009 Michael Foord
# Copyright (C) 2007-2010 Michael Foord
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment