Greetings!
Mocker 0.9 has just been released. The list of changes is
provided below.
Where
-----
http://labix.org/mocker
About
-----
- Graceful platform for test doubles in Python (mocks, stubs,
fakes, and dummies).
- Inspiration from real needs, and also from pmock, jmock,
pymock, easymock, etc.
- Expectation of expressions defined by actually using mock objects.
- Expressions may be replayed in any order by default,
- Trivial specification of ordering between expressions when wanted.
- Nice parameter matching for defining expectations on method calls.
- Good error messages when expectations are broken.
- Mocking of many kinds of expressions (getting/setting/deleting
attributes, calling, iteration, containment, etc)
- Graceful handling of nested expressions (e.g.
"person.details.get_phone().get_prefix()")
- Mock "proxies", which allow passing through to the real object on
specified expressions (e.g. useful with "os.path.isfile()").
- Mocking via temporary "patching" of existent classes and instances.
- Trivial mocking of any external module (e.g. "time.time()") via
"proxy replacement".
- Mock objects may have method calls checked for conformance with
real class/instance to prevent API divergence.
- Type simulation for using mocks while still performing certain
type-checking operations.
- Nice (optional) integration with "unittest.TestCase", including
additional assertions (e.g. "assertIs", "assertIn", etc).
- More ...
Changes in 0.9
--------------
- Added MockerTestCase.makeFile() and .makeDir() helpers. They offer
easy creation of temporary files/directories, and ensure that they
get removed after each test method runs.
- Added MockerTestCase.assertMethodsMatch(). It will verify if all
public methods found in the class passed as the first argument are
also present in the class passed as the second argument, and that
they accept the same arguments. This is useful to verify if a fake
or stub class have the same API as the real class being simulated.
- Added MockerTestCase.assert[Not]{Starts,Ends}With().
- If the replay() method is called twice, expectations will be fully
reset so that several similar tests may be performed in a row by
just calling replay() again.
- Mocker.on_restore() removed. Restore isn't performed if replay()
isn't called, and that may not be obvious, so a hook won't be
exposed for now.
- When using a non-existent import path for Mocker.proxy(), raise an
ImportError on the base module, rather than using the actual
string as the object (#162315).
--
Gustavo Niemeyer
http://niemeyer.net
I've released lockfile 0.2. Changes since the 0.1 release:
* Added 2.4.diff file to patch lockfile to work with Python 2.4 (removes
use of with statement).
* Renamed _FileLock base class to LockBase to expose it (and its
docstrings) to pydoc.
* Got rid of time.sleep() calls in tests (thanks to Konstantin
Veretennicov).
* Use thread.get_ident() as the thread discriminator.
* Updated documentation a bit.
What is lockfile?
=================
A number of implementations of file locks are out there, but as an
exploration of the possibilities I wrote the lockfile module. It offers
these features:
* A platform-independent API
* Three classes implementing file locks
- LinkFileLock - relies on atomic nature of the link(2) system call.
- MkdirFileLock - relies on atomic nature of the mkdir(2) systemm
call.
- SQLiteFileLock - provides locks through a SQLite database.
* Locking is done on a per-thread basis by default, though locking can
be done on a per-process basis instead.
* Context manager support.
The lockfile module is available from PyPI:
http://pypi.python.org/pypi/lockfile/
I welcome feedback from anyone who gives it a whirl. The code is stored in
a Mercurial repository on my laptop, so subject to occasional access
problems when I'm on the train others are welcome to have access to the
source code. If that's of interest to you, drop me a note.
--
Skip Montanaro - skip(a)pobox.com - http://www.webfast.com/~skip/
www.crosspa.de is proud to announce the first release of CPAE (Cross
Platform Applications Engine).
It is a universal packager for script languages like Python 2.5 that
combines script applications, interpreter and runtime files into a
single self-extracting binary (exe) that can be executed immediately
on the target platform.
The current release 1.0 RC1 is free for download and unrestricted in
functionality. However the generated binaries are
restricted to 7 days runtime in the trial version.
A manual with installation, configuration, tool usage and examples is
available on the website.
You can find more information or download he product from http://www.crosspa.de
Supported platforms: Microsoft Windows (x86), Linux2 (x86), Solaris
(Sparc + x86).
=====================================
Release of the first PyTables video
=====================================
`Carabos <http://www.carabos.com/>`_ is very proud to announce the
first of a series of videos dedicated to introducing the main features
of PyTables to the public in a visual and easy to grasp manner.
http://www.carabos.com/videos/pytables-1-intro
`PyTables <http://www.pytables.org/>`_ is a Free/Open Source package
designed to handle massive amounts of data in a simple, but highly
efficient way, using the HDF5 file format and NumPy data containers.
This first video is an introductory overview of PyTables, covering the
following topics:
* HDF5 file creation
* the object tree
* homogeneous array storage
* natural naming
* working with attributes
With a running length of little more than 10 minutes, you may sit back
and watch it during any short break.
More videos about PyTables will be published in the near future. Stay
tuned on www.pytables.org for the announcement of the new videos.
We would like to hear your opinion on the video so we can do it better
the next time. We are also open to suggestions for the topics of
future videos.
Best regards,
::
Ivan Vilata i Balaguer >qo< http://www.carabos.com/
Cárabos Coop. V. V V Enjoy Data
""
Dear Pythonistas,
with great pleasure and some pride I'd like to announce that pyCologne,
the Python User Group Köln, will meet for the 13th time this week and we
are therefore celebrating our 1st anniversary.
The next meeting takes place here:
Date: Wednesday Nov 11, 2007
Time: 6:30 Uhr pm c.t.
Venue: Pool 0.14, Benutzerrechenzentrum (RRZK-B) der Universität Köln,
Berrenrather Str. 136, 50937 Köln
Agenda:
* From the series "My favourite editor": Emacs (Rebecca Breu)
* Discussion: The first year pyCologne
* Topics for a Python beginner's course (Rebecca Breu)
* pyCologne logo decision
Around 9 pm we will head to a nearby establishment and have some drinks,
food and a friendly chat.
Further information about pyCologne, including directions, photographs
and minutes of past meetings etc., can be found on our web site on the
German Python wiki:
http://www.pycologne.de/
CU,
Christopher Arndt
Hello Pythonistas,
Mocker 0.8 is now public.
Where
-----
http://labix.org/mocker
What
----
- Graceful platform for test doubles in Python (mocks, stubs,
fakes, and dummies).
- Inspiration from real needs, and also from pmock, jmock,
pymock, easymock, etc.
- Expectation of expressions defined by actually using mock objects.
- Expressions may be replayed in any order by default,
- Trivial specification of ordering between expressions when wanted.
- Nice parameter matching for defining expectations on method calls.
- Good error messages when expectations are broken.
- Mocking of many kinds of expressions (getting/setting/deleting
attributes, calling, iteration, containment, etc)
- Graceful handling of nested expressions (e.g.
"person.details.get_phone().get_prefix()")
- Mock "proxies", which allow passing through to the real object on
specified expressions (e.g. useful with "os.path.isfile()").
- Mocking via temporary "patching" of existent classes and instances.
- Trivial mocking of any external module (e.g. "time.time()") via
"proxy replacement".
- Mock objects may have method calls checked for conformance with
real class/instance to prevent API divergence.
- Type simulation for using mocks while still performing certain
type-checking operations.
- Nice (optional) integration with "unittest.TestCase", including
additional assertions (e.g. "assertIs", "assertIn", etc).
- More ...
--
Gustavo Niemeyer
http://niemeyer.net