summaryrefslogtreecommitdiff
path: root/NEWS
blob: 5693fb3e5a8396ab1da3c6860f48e808d7d5c300 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
0.10.1 (2007-12-11)
===================

- Fixed patching of objects which define __getattr__.


0.10 (2007-12-09)
=================

- Greatly improved error messages and logic for expression ordering!

- Implemented MockerTestCase.addCleanup().  It allows one to
  register cleanup functions to be called after the test is
  complete.

- MockerTestCase now verifies if the mocker is put in replay
  mode in cases where events were recorded.

- New MATCH() argument matcher, which allows using a function
  to match an argument generically.  E.g. MATCH(lambda x: x > 10)

- New 'path' option to MockerTestCase.makeFile() and makeDir(),
  which allows setting the full target path with a single option.

- Now when a spec is provided (or with proxy/replace/patch) the
  existence of the real method is checked even if the mocked
  method doesn't execute.  This is useful to detect API expectation
  errors even if count(0) is used (a negative assertion).

- Implemented in MockerTestCase support for Deferred results as
  understood by Twisted Trial's TestCase, so that coexistence by
  multiple inheritance is possible and trivial.

- MockerTestCase.makeFile() with content=None (the default) now
  consistently returns an unexistent temporary filename which
  is properly cleaned up if created.

- Fixed problem when requesting order on similar expressions.  The
  second expression might not be accepted.

- When the expression executed isn't exactly the same as the
  recorded events (e.g. when parameter matchers are used), show in
  the error message the real expression run, to aid in debugging.


0.9.3 (2007-11-24)
==================

- Added support for Python 2.3 (patch by Phillip J. Eby).

- Added MockerTestCase.assert{True,False} aliases, so that they're
  available even in Python 2.3.

- Introduced automatic test coverage verification as part of
  the test suite, based on the 'coverage' module by Ned Batchelder,
  to ensure that it continues to have 100% of statement coverage.


0.9.2 (2007-11-22)
==================

- In recording mode, mock.__class__ will now return Mock, and not
  record the action.  This allows Mocker to be used in interactive
  environments which inspect the result's type, such as in iPython
  (reported by Alex Dante).

- Now Mocker.mock()/proxy()/replace() accept a 'count' keyword
  parameter, which if set to False, the default behavior of allowing
  expressions just once is disabled.


0.9.1 (2007-11-18)
==================

- Fixed setup.py to install mocker.py properly.


0.9 (2007-11-17)
================

- 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 has 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).


0.8 (2007-11-11)
================

Released!