-
Notifications
You must be signed in to change notification settings - Fork 11
/
CHANGELOG
253 lines (159 loc) · 4.74 KB
/
CHANGELOG
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
1.1.1
=====
Added support for side_effect in spies.
Fixed spies on classmethods.
1.1.0
=====
Added support for PyPy
1.0.1
=====
Fixes tests and unbound method support in Python 3
https://github.com/agoragames/chai/pull/23 @pypingou
https://github.com/agoragames/chai/pull/24 @GraylinKim
1.0.0
=====
Implemented spies.
1.0 release, Chai is largely feature complete.
0.4.8
=====
Fix PEP8 compliance.
Fix #18; don't overwrite test module's global namespace where names match
Chai methods.
0.4.7
=====
Fix reporting on unmet expectations, regression from 0.4.6 release. Thanks
to @ods94065 https://github.com/agoragames/chai/pull/16
0.4.6
=====
Immediately after running a test, teardown the stubs. This fixes any problems
with exception handling, such as UnexpectedCall, when methods involved in
exception handling, such as `open`, have been stubbed.
0.4.5
=====
Fixed packaging and test running thanks to @pypingou
0.4.4
=====
Fixed handling of skipped tests
0.4.3
=====
Fixed regression in stubbing functions introduced in python 3 changes
0.4.2
=====
Fixed regression in not raising an AssertionError for python 2
0.4.1
=====
Fixed UnexpectedCall handling in Python 2. Fixes
https://github.com/agoragames/chai/issues/8.
0.4.0
=====
Fixed Python 3 support. Fixes https://github.com/agoragames/chai/issues/5.
0.3.7
=====
Fixed teardown of __new__ on types that overload the method
0.3.6
=====
Fix logic of raising UnexpectedCall when calling a stub and an unclosed,
non-matching, in-order expectation does not have its counts met
0.3.5
=====
Only close a non-matching expectation if its counts have been met, else
it's an UnexpectedCall
0.3.4
=====
Removed termcolor requirement. Both termcolor and unittest2 are optional.
0.3.3
=====
Removed unittest2 requirement, fixes https://github.com/agoragames/chai/issues/5
0.3.2
=====
Expectations with a type argument are matched against either an instance
of that type, or the type itself
0.3.1
=====
Further fixed global namespace manipulation on test class hierarchies
0.3.0
=====
Improve iterative expectations by not insisting that one knows how many
times an expectation will be called unless explicitly set
Assume any arguments on an expectation unless explicitly set
Fixed stubbing properties on an instance
0.2.4
=====
Fixes bug in stubs on types by preventing secondary initialization
0.2.3
=====
Mock objects report parameters and method name when raising UnexpectedCall
Fixed global namespace manipulation on deeply nested Chai subclasses
0.2.2
=====
UnexpectedCall is now a BaseException which is re-raised as an AssertionError
in Chai metaclass `test_wrapper` method. This decreases the chance that
UnexpectedCall will be caught by the application code being tested.
0.2.1
=====
Allow variables in returns(), effectively treating the variable as a regex capture.
0.2.0
=====
Merge pull request to close issue #2
0.1.23
======
side_effect is passed the arguments of the expectation if it doesn't define
its own arguments
0.1.22
======
side_effect takes arguments after the method to eliminate need for a lambda
0.1.21
======
Fixed a bug with (un)stubbing of a module attribute which is really a classmethod
Added support for `with` statement on expectations, see README for usage
Fixed (un)stubbing of methods originally defined on `object` class
0.1.20
======
Added __eq__ to all comparators so that they can be used inside data structures.
0.1.19
======
Fixed failure to teardown stub on __new__ after `expect(type)`
0.1.18
======
Simplified stubbing of object creation, so that `expect(type)` can be used as
if it was mocking __init__, but return an object as if it was mocking __new__.
0.1.17
======
Fix edge case where an attribute might not be defined on a class when
calling stub(obj, 'attr').
0.1.16
======
Added Mock.__nonzero__ to re-support "if exists" code, which was broken by
the addition of Mock.__len__.
0.1.15
======
Added container and context manager interfaces to Mock object
0.1.14
======
Added 'any_args' expectation modifier and 'like' comparator. See documentaion
for details.
0.1.13
======
Added 'var' comparator for ability to assert that the same argument was used
for one or more expectations, and then to fetch the variable after the call
and run assertions on it. See documentation for details.
0.1.12
======
Added teardown() expectation modifier to allow for removing a stub after
it has been met
0.1.11
======
Support stubbing of built-in functions and methods
0.1.10
======
Support stubbing of functions if they have a module context
0.1.9
=====
Much nicer output from expectations
Coloring output
0.1.8
=====
Support stubbing of get, set and delete on class properties through both
attribute name and object reference
Improved output on unmet expectations
Changelog