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


Groups > comp.lang.python.announce > #717

[ANN] mock 1.0.0 released

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <news@google.com>
X-Original-To python-announce@python.org
Delivered-To python-announce-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'url:pypi': 0.03; 'exception': 0.03; 'argument': 0.04; 'ignored': 0.05; 'skip:` 10': 0.05; 'arguments': 0.07; 'attributes': 0.07; 'builtin': 0.07; 'pypi': 0.07; 'raised': 0.07; 'subject:ANN': 0.07; 'subject:released': 0.07; 'used.': 0.07; 'python': 0.09; '1.0.0': 0.09; 'callable': 0.09; 'foord': 0.09; "object's": 0.09; 'patches': 0.09; 'propagate': 0.09; 'spec': 0.09; 'url:voidspace': 0.09; "wouldn't": 0.11; 'library': 0.15; 'passing': 0.15; '"standard': 0.16; '(other': 0.16; 'evaluates': 0.16; 'from:addr:fuzzyman': 0.16; 'from:name:michael foord': 0.16; 'iterable': 0.16; 'non-callable': 0.16; 'released.': 0.16; 'subclassing': 0.16; 'helper': 0.17; 'skip:` 20': 0.17; '(in': 0.18; 'subject:] ': 0.19; 'changes': 0.20; 'contributed': 0.20; 'all,': 0.21; 'hey': 0.21; 'exceptions': 0.22; 'libraries': 0.22; 'class.': 0.23; 'properties': 0.24; 'raise': 0.24; 'feature': 0.24; 'testing': 0.24; 'allows': 0.25; 'pass': 0.25; 'header:User- Agent:1': 0.26; 'library.': 0.27; 'replace': 0.27; 'comparison': 0.29; 'equality': 0.29; 'objects': 0.29; 'reset': 0.29; "i'm": 0.29; 'install': 0.29; 'keyword': 0.30; 'returned': 0.30; 'function': 0.30; 'error': 0.30; 'url:python': 0.32; 'could': 0.32; 'info': 0.32; 'traceback': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'list': 0.35; 'along': 0.35; 'false': 0.35; 'requiring': 0.35; 'received:209.85': 0.35; 'created': 0.36; 'michael': 0.36; 'url:org': 0.36; 'announce': 0.36; 'method': 0.36; 'test': 0.36; 'best,': 0.37; 'correctly': 0.37; 'subject:[': 0.37; 'received:209': 0.37; 'received:209.85.216': 0.37; 'object': 0.38; 'supports': 0.38; 'page': 0.38; 'instead': 0.39; 'skip:" 10': 0.40; 'your': 0.60; 'skip:u 10': 0.60; 'results': 0.65; 'pleased': 0.66; 'to:addr:comp-lang-python-announce': 0.70; 'received:130': 0.75; 'to:addr:moderators.isc.org': 0.79; 'received:130.133': 0.82; 'received:130.133.4': 0.82; 'received:130.133.4.7': 0.82; 'received:individual.net': 0.82; 'received:moderators.individual.net': 0.82; 'mock': 0.84; 'parity': 0.84; 'received:209.85.216.197': 0.84; 'results,': 0.91
Newsgroups comp.lang.python.announce
Date Sun, 7 Oct 2012 13:48:46 -0700 (PDT)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=86.139.153.127; posting-account=rJGH6woAAAA8aYshsH3bwEcz-guIOP6p
User-Agent G2/1.0
MIME-Version 1.0
Subject [ANN] mock 1.0.0 released
From Michael Foord <fuzzyman@gmail.com>
Injection-Date Sun, 07 Oct 2012 20:48:46 +0000
To comp-lang-python-announce@moderators.isc.org
Content-Type text/plain; charset=ISO-8859-1
X-Mailman-Approved-At Mon, 08 Oct 2012 20:23:49 +0200
X-BeenThere python-announce-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To python-list@python.org
List-Id Announcement-only list for the Python programming language <python-announce-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-announce-list>, <mailto:python-announce-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-announce-list/>
List-Post <mailto:python-announce-list@python.org>
List-Help <mailto:python-announce-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-announce-list>, <mailto:python-announce-list-request@python.org?subject=subscribe>
Approved python-announce-list@python.org
Message-ID <mailman.1957.1349720630.27098.python-announce-list@python.org> (permalink)
Lines 49
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1349720630 news.xs4all.nl 6856 [2001:888:2000:d::a6]:60672
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python.announce:717

Show key headers only | View raw


Hey all,

I'm pleased to announce that mock 1.0.0 has been released. This is the "standard library version", mock 1.0.0 has feature parity with "unittest.mock" in the Python 3.3 standard library.

mock is a library for testing in Python. It allows you to replace parts of your system under test with mock objects and make assertions about how they have been used.

You can download mock from the PyPI page or install it with:

    pip install -U mock

	http://pypi.python.org/pypi/mock
	http://www.voidspace.org.uk/python/mock/
	http://www.voidspace.org.uk/python/mock/changelog.html#version-1-0-0

Full list of changes since 0.8:

* `mocksignature`, along with the `mocksignature` argument to `patch`, removed
* Support for deleting attributes (accessing deleted attributes will raise an
  `AttributeError`)
* Added the `mock_open` helper function for mocking the builtin `open`
* `__class__` is assignable, so a mock can pass an `isinstance` check without
  requiring a spec
* Addition of `PropertyMock`, for mocking properties
* `MagicMocks` made unorderable by default (in Python 3). The comparison
  methods (other than equality and inequality) now return `NotImplemented`
* Propagate traceback info to support subclassing of `_patch` by other
  libraries
* `create_autospec` works with attributes present in results of `dir` that
  can't be fetched from the object's class. Contributed by Konstantine Rybnikov
* Any exceptions in an iterable `side_effect` will be raised instead of
  returned
* In Python 3, `create_autospec` now supports keyword only arguments
* Added `patch.stopall` method to stop all active patches created by `start`
* BUGFIX: calling `MagicMock.reset_mock` wouldn't reset magic method mocks
* BUGFIX: calling `reset_mock` on a `MagicMock` created with autospec could
  raise an exception
* BUGFIX: passing multiple spec arguments to patchers (`spec` , `spec_set` and
  `autospec`) had unpredictable results, now it is an error
* BUGFIX: using `spec=True` *and* `create=True` as arguments to patchers could
  result in using `DEFAULT` as the spec. Now it is an error instead
* BUGFIX: using `spec` or `autospec` arguments to patchers, along with
  `spec_set=True` did not work correctly
* BUGFIX: using an object that evaluates to False as a spec could be ignored
* BUGFIX: a list as the `spec` argument to a patcher would always result in a
  non-callable mock. Now if `__call__` is in the spec the mock is callable

All the best,

Michael Foord

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


Thread

[ANN] mock 1.0.0 released Michael Foord <fuzzyman@gmail.com> - 2012-10-07 13:48 -0700

csiph-web