Improve showing of import errors in the Python runner.
[third_party/subunit] / NEWS
1 ---------------------
2 subunit release notes
3 ---------------------
4
5 NEXT (In development)
6 ---------------------
7
8 BUGFIXES
9 ~~~~~~~~
10
11 * Tests have been fixed with testtools 1.2.0 and above.
12   (Robert Collins)
13
14 IMPROVEMENTS
15 ~~~~~~~~~~~~
16
17 * With testtools 1.4.0 and above import errors are now
18   shown in detail by ``subunit.run``. (Robert Collins)
19
20 0.0.21
21 ------
22
23 BUGFIXES
24 ~~~~~~~~
25
26 * Brown bag bugfix - 0.0.20's setup.py referenced cvs not csv.
27   (Robert Collins, #1361924)
28
29 0.0.20
30 ------
31
32 BUGFIXES
33 ~~~~~~~~
34
35 * subunit2csv is now installed when using pip.
36   (Robert Collins, #1279669)
37
38 * testscenarios is now a test dependency, not an install dependency.
39   (Arfrever Frehtes Taifersar Arahesis, #1292757)
40
41 * The python-subunit tarball can now have setup run from the current
42   directory. (Robert Collins, #1361857)
43
44 0.0.19
45 ------
46
47 IMPROVEMENTS
48 ~~~~~~~~~~~~
49
50 * ``subunit.run`` in Python will now exit 0 as long as the test stream has
51   been generated correctly - this has always been the intent but API friction
52   with testtools had prevented it working.
53   (Robert Collins)
54
55 0.0.18
56 ------
57
58 IMPROVEMENTS
59 ~~~~~~~~~~~~
60
61 * Fix compatibility with testtools 0.9.35 which dropped the 'all' compat
62   symbol. This breaks support for Python versions lower than 2.6.
63   (Robert Collins, #1274056)
64
65 0.0.17
66 ------
67
68 IMPROVEMENTS
69 ~~~~~~~~~~~~
70
71 * Add ``subunit-output`` tool that can generate a Subunit v2 bytestream from
72   arguments passed on the command line. (Thomi Richards, #1252084)
73
74 0.0.16
75 ------
76
77 BUG FIXES
78 ~~~~~~~~~
79
80 * Perl files should now honour perl system config.
81   (Benedikt Morbach, #1233198)
82
83 * Python 3.1 and 3.2 have an inconsistent memoryview implementation which
84   required a workaround for NUL byte detection. (Robert Collins, #1216246)
85
86 * The test suite was failing 6 tests due to testtools changing it's output
87   formatting of exceptions. (Robert Collins)
88
89 * V2 parser errors now set appropriate mime types for the encapsulated packet
90   data and the error message. (Robert Collins)
91
92 * When tests fail to import ``python subunit.run -l ...`` will now write a 
93   subunit file attachment listing the failed imports and exit 2, rather than
94   listing the stub objects from the importer and exiting 0.
95   (Robert Collins, #1245672)
96
97 IMPROVEMENTS
98 ~~~~~~~~~~~~
99
100 * Most filters will now accept a file path argument instead of only reading
101   from stdin. (Robert Collins, #409206)
102
103 0.0.15
104 ------
105
106 BUG FIXES
107 ~~~~~~~~~
108
109 * Clients of subunit did not expect memoryview objects in StreamResult events.
110   (Robert Collins)
111
112 * Memoryview and struct were mutually incompatible in 2.7.3 and 3.2.
113   (Robert Collins, #1216163)
114
115 0.0.14
116 ------
117
118 BUG FIXES
119 ~~~~~~~~~
120
121 * Memoryview detection was broken and thus it's use was never really tested.
122   (Robert Collins, 1216101)
123
124 * TestProtocol2's tag tests were set sort order dependent.
125   (Robert Collins, #1025392)
126
127 * TestTestProtocols' test_tags_both was set sort order dependent.
128   (Robert Collins, #1025392)
129
130 * TestTestProtocols' test_*_details were dictionary sort order dependent.
131   (Robert Collins, #1025392)
132
133 * TestSubUnitTags's test_add_tag was also se sort order dependent.
134   (Robert Collins, #1025392)
135
136 0.0.13
137 ------
138
139 IMPROVEMENTS
140 ~~~~~~~~~~~~
141
142 * subunit should now build with automake 1.11 again. (Robert Collins)
143
144 * `subunit-stats` no longer outputs encapsulated stdout as subunit.
145   (Robert Collins, #1171987)
146
147 * The logic for `subunit.run` is now importable via python -
148   `subunit.run.main`. (Robert Collins, #606770)
149
150 BUG FIXES
151 ~~~~~~~~~
152
153 * Removed GPL files that were (C) non Subunit Developers - they are
154   incompatible for binary distribution, which affects redistributors.
155   (Robert Collins, #1185591)
156
157 0.0.12
158 ------
159
160 BUG FIXES
161 ~~~~~~~~~
162
163 * Subunit v2 packets with both file content and route code were not being
164   parsed correctly - they would incorrectly emit a parser error, due to trying
165   to parse the route code length from the first byes of the file content.
166   (Robert Collins, 1172815)
167
168 0.0.11
169 ------
170
171 v2 protocol draft included in this release. The v2 protocol trades off human
172 readability for a massive improvement in robustness, the ability to represent
173 concurrent tests in a single stream, cheaper parsing, and that provides
174 significantly better in-line debugging support and structured forwarding
175 of non-test data (such as stdout or stdin data).
176
177 This change includes two new filters (subunit-1to2 and subunit-2to1). Use
178 these filters to convert old streams to v2 and convert v2 streams to v1.
179
180 All the other filters now only parse and emit v2 streams. V2 is still in
181 draft format, so if you want to delay and wait for v2 to be finalised, you
182 should use subunit-2to1 before any serialisation steps take place.
183 With the ability to encapsulate multiple non-test streams, another significant
184 cange is that filters which emit subunit now encapsulate any non-subunit they
185 encounter, labelling it 'stdout'. This permits multiplexing such streams and
186 detangling the stdout streams from each input.
187
188 The subunit libraries (Python etc) have not changed their behaviour: they
189 still emit v1 from their existing API calls. New API's are being added
190 and applications should migrate once their language has those API's available.
191
192 IMPROVEMENTS
193 ~~~~~~~~~~~~
194
195 * ``subunit.run`` now replaces sys.stdout to ensure that stdout is unbuffered
196   - without this pdb output is not reliably visible when stdout is a pipe
197   as it usually is. (Robert Collins)
198
199 * v2 protocol draft included in this release. (Python implementation only so
200   far). (Robert Collins)
201
202 * Two new Python classes -- ``StreamResultToBytes`` and
203   ``ByteStreamToStreamResult`` handle v2 generation and parsing.
204   (Robert Collins)
205
206 0.0.10
207 ------
208
209 BUG FIXES
210 ~~~~~~~~~
211
212 * make_stream_binary is now public for reuse. (Robert Collins)
213
214 * NAME was not defined in the protocol BNF. (Robert Collins)
215
216 * UnsupportedOperation is available in the Python2.6 io library, so ask
217   forgiveness rather than permission for obtaining it. (Robert Collins)
218
219 * Streams with no fileno() attribute are now supported, but they are not
220   checked for being in binary mode: be sure to take care of that if using
221   the library yourself. (Robert Collins)
222
223 0.0.9
224 -----
225
226 BUG FIXES
227 ~~~~~~~~~
228
229 * All the source files are now included in the distribution tarball.
230   (Arfrever Frehtes Taifersar Arahesis, Robert Collins, #996275)
231
232 * ``python/subunit/tests/test_run.py`` and ``python/subunit/filters.py`` were
233   not included in the 0.0.8 tarball. (Robert Collins)
234
235 * Test ids which include non-ascii unicode characters are now supported.
236   (Robert Collins, #1029866)
237
238 * The ``failfast`` option to ``subunit.run`` will now work. The dependency on
239   testtools has been raised to 0.9.23 to permit this.
240   (Robert Collins, #1090582)
241
242 0.0.8
243 -----
244
245 IMPROVEMENTS
246 ~~~~~~~~~~~~
247
248 * Perl module now correctly outputs "failure" instead of "fail".  (Stewart Smith)
249
250 * Shell functions now output timestamps. (Stewart Smith, Robert Collins)
251
252 * 'subunit2csv' script that converts subunit output to CSV format.
253   (Jonathan Lange)
254
255 * ``TagCollapsingDecorator`` now correctly distinguishes between local and
256   global tags.  (Jonathan Lange)
257
258 * ``TestResultFilter`` always forwards ``time:`` events.
259   (Benji York, Brad Crittenden)
260
261 BUG FIXES
262 ~~~~~~~~~
263
264 * Add 'subunit --no-xfail', which will omit expected failures from the subunit
265   stream. (John Arbash Meinel, #623642)
266
267 * Add 'subunit -F/--only-genuine-failures' which sets all of '--no-skips',
268   '--no-xfail', '--no-passthrough, '--no-success', and gives you just the
269   failure stream. (John Arbash Meinel)
270
271 * Python2.6 support was broken by the fixup feature.
272   (Arfrever Frehtes Taifersar Arahesis, #987490)
273
274 * Python3 support regressed in trunk.
275   (Arfrever Frehtes Taifersar Arahesis, #987514)
276
277 * Python3 support was insufficiently robust in detecting unicode streams.
278   (Robert Collins, Arfrever Frehtes Taifersar Arahesis)
279
280 * Tag support has been implemented for TestProtocolClient.
281   (Robert Collins, #518016)
282
283 * Tags can now be filtered. (Jonathan Lange, #664171)
284
285 * Test suite works with latest testtools (but not older ones - formatting
286   changes only). (Robert Collins)
287
288 0.0.7
289 -----
290
291 The Subunit Python test runner ``python -m subunit.run`` can now report the
292 test ids and also filter via a test id list file thanks to improvements in
293 ``testtools.run``. See the testtools manual, or testrepository - a major
294 user of such functionality.
295
296 Additionally the protocol now has a keyword uxsuccess for Unexpected Success
297 reporting. Older parsers will report tests with this status code as 'lost
298 connection'.
299
300 IMPROVEMENTS
301 ~~~~~~~~~~~~
302
303 * Add ``TimeCollapsingDecorator`` which collapses multiple sequential time()
304   calls into just the first and last. (Jonathan Lange)
305
306 * Add ``TagCollapsingDecorator`` which collapses many tags() calls into one
307   where possible. (Jonathan Lange, Robert Collins)
308
309 * Force flush of writes to stdout in c/tests/test_child.
310   (Jelmer Vernooij, #687611)
311
312 * Provisional Python 3.x support.
313   (Robert Collins, Tres Seaver, Martin[gz], #666819)
314
315 * ``subunit.chunked.Decoder`` Python class takes a new ``strict`` option,
316   which defaults to ``True``. When ``False``, the ``Decoder`` will accept
317   incorrect input that is still unambiguous. i.e. subunit will not barf if
318   a \r is missing from the input. (Martin Pool)
319
320 * ``subunit-filter`` preserves the relative ordering of ``time:`` statements,
321   so you can now use filtered streams to gather data about how long it takes
322   to run a test. (Jonathan Lange, #716554)
323
324 * ``subunit-ls`` now handles a stream with time: instructions that start
325   partway through the stream (which may lead to strange times) more gracefully.
326   (Robert Collins, #785954)
327
328 * ``subunit-ls`` should handle the new test outcomes in Python2.7 better.
329   (Robert Collins, #785953)
330
331 * ``TestResultFilter`` now collapses sequential calls to time().
332   (Jonathan Lange, #567150)
333
334 * ``TestResultDecorator.tags()`` now actually works, and is no longer a buggy
335   copy/paste of ``TestResultDecorator.time()``. (Jonathan Lange, #681828)
336
337 * ``TestResultFilter`` now supports a ``fixup_expected_failures``
338   argument. (Jelmer Vernooij, #755241)
339
340 * The ``subunit.run`` Python module supports ``-l`` and ``--load-list`` as
341   per ``testtools.run``. This required a dependency bump due to a small
342   API change in ``testtools``. (Robert Collins)
343
344 * The help for subunit-filter was confusing about the behaviour of ``-f`` /
345   ``--no-failure``. (Robert Collins, #703392)
346
347 * The Python2.7 / testtools addUnexpectedSuccess API is now supported. This
348   required adding a new status code to the protocol. (Robert Collins, #654474)
349
350 CHANGES
351 ~~~~~~~
352
353 * testtools 0.9.11 or newer is new needed (due to the Python 3 support).
354   (Robert Collins)
355
356 0.0.6
357 -----
358
359 This release of subunit fixes a number of unicode related bugs. This depends on
360 testtools 0.9.4 and will not function without it. Thanks to Tres Seaver there
361 is also an optional native setup.py file for use with easy_install and the
362 like.
363
364 BUG FIXES
365 ~~~~~~~~~
366
367 * Be consistent about delivering unicode content to testtools StringException
368   class which has become (appropriately) conservative. (Robert Collins)
369
370 * Fix incorrect reference to subunit_test_failf in c/README.
371   (Brad Hards, #524341)
372
373 * Fix incorrect ordering of tags method parameters in TestResultDecorator. This
374   is purely cosmetic as the parameters are passed down with no interpretation.
375   (Robert Collins, #537611)
376
377 * Old style tracebacks with no encoding info are now treated as UTF8 rather
378   than some-random-codec-like-ascii. (Robert Collins)
379
380 * On windows, ProtocolTestCase and TestProtocolClient will set their streams to
381   binary mode by calling into msvcrt; this avoids having their input or output
382   mangled by the default line ending translation on that platform.
383   (Robert Collins, Martin [gz], #579296)
384
385 IMPROVEMENTS
386 ~~~~~~~~~~~~
387
388 * Subunit now has a setup.py for python deployments that are not using
389   distribution packages. (Tres Seaver, #538181)
390
391 * Subunit now supports test discovery by building on the testtools support for
392   it. You can take advantage of it with "python -m subunit.run discover [path]"
393   and see "python -m subunit.run discover --help" for more options.
394
395 * Subunit now uses the improved unicode support in testtools when outputting
396   non-details based test information; this should consistently UTF8 encode such
397   strings.
398
399 * The Python TestProtocolClient now flushes output on startTest and stopTest.
400   (Martin [gz]).
401
402
403 0.0.5
404 -----
405
406 BUG FIXES
407 ~~~~~~~~~
408
409 * make check was failing if subunit wasn't installed due to a missing include
410   path for the test program test_child.
411
412 * make distcheck was failing due to a missing $(top_srcdir) rune.
413
414 IMPROVEMENTS
415 ~~~~~~~~~~~~
416
417 * New filter `subunit-notify` that will show a notification window with test 
418   statistics when the test run finishes.
419
420 * subunit.run will now pipe its output to the command in the 
421   SUBUNIT_FORMATTER environment variable, if set.
422
423 0.0.4
424 -----
425
426 BUG FIXES
427 ~~~~~~~~~
428
429 * subunit2junitxml -f required a value, this is now fixed and -f acts as a
430   boolean switch with no parameter.
431
432 * Building with autoconf 2.65 is now supported.
433
434
435 0.0.3
436 -----
437
438   CHANGES:
439   
440     * License change, by unanimous agreement of contributors to BSD/Apache
441       License Version 2.0. This makes Subunit compatible with more testing
442       frameworks.
443
444   IMPROVEMENTS:
445
446     * CPPUnit is now directly supported: subunit builds a cppunit listener
447       ``libcppunit-subunit``. 
448
449     * In the python API ``addExpectedFailure`` and ``addUnexpectedSuccess``
450       from python 2.7/3.1 are now supported. ``addExpectedFailure`` is
451       serialised as ``xfail``, and ``addUnexpectedSuccess`` as ``success``.
452       The ``ProtocolTestCase`` parser now calls outcomes using an extended
453       API that permits attaching arbitrary MIME resources such as text files
454       log entries and so on. This extended API is being developed with the
455       Python testing community, and is in flux. ``TestResult`` objects that
456       do not support the API will be detected and transparently downgraded
457       back to the regular Python unittest API.
458
459     * INSTALLDIRS can be set to control the perl MakeMaker 'INSTALLDIRS'
460       viarable when installing.
461
462     * Multipart test outcomes are tentatively supported; the exact protocol
463       for them, both serialiser and object is not yet finalised. Testers and
464       early adopters are sought. As part of this and also in an attempt to
465       provider a more precise focus on the wire protocol and toolchain, 
466       Subunit now depends on testtools (http://launchpad.net/testtools)
467       release 0.9.0 or newer.
468
469     * subunit2junitxml supports a new option, --forward which causes it
470       to forward the raw subunit stream in a similar manner to tee. This
471       is used with the -o option to both write a xml report and get some
472       other subunit filter to process the stream.
473
474     * The C library now has ``subunit_test_skip``.
475
476   BUG FIXES:
477
478     * Install progress_model.py correctly.
479
480     * Non-gcc builds will no longer try to use gcc specific flags.
481       (Thanks trondn-norbye)
482
483   API CHANGES:
484
485   INTERNALS:
486
487 0.0.2
488 -----
489
490   CHANGES:
491
492   IMPROVEMENTS:
493
494     * A number of filters now support ``--no-passthrough`` to cause all
495       non-subunit content to be discarded. This is useful when precise control
496       over what is output is required - such as with subunit2junitxml.
497
498     * A small perl parser is now included, and a new ``subunit-diff`` tool
499       using that is included. (Jelmer Vernooij)
500
501     * Subunit streams can now include optional, incremental lookahead
502       information about progress. This allows reporters to make estimates
503       about completion, when such information is available. See the README
504       under ``progress`` for more details.
505
506     * ``subunit-filter`` now supports regex filtering via ``--with`` and
507       ``without`` options. (Martin Pool)
508
509     * ``subunit2gtk`` has been added, a filter that shows a GTK summary of a
510       test stream.
511
512     * ``subunit2pyunit`` has a --progress flag which will cause the bzrlib
513       test reporter to be used, which has a textual progress bar. This requires
514       a recent bzrlib as a minor bugfix was required in bzrlib to support this.
515
516     * ``subunit2junitxml`` has been added. This filter converts a subunit
517       stream to a single JUnit style XML stream using the pyjunitxml
518       python library.
519
520     * The shell functions support skipping via ``subunit_skip_test`` now.
521
522   BUG FIXES:
523
524     * ``xfail`` outcomes are now passed to python TestResult's via
525       addExpectedFailure if it is present on the TestResult. Python 2.6 and
526       earlier which do not have this function will have ``xfail`` outcomes
527       passed through as success outcomes as earlier versions of subunit did.
528
529   API CHANGES:
530
531     * tags are no longer passed around in python via the ``TestCase.tags``
532       attribute. Instead ``TestResult.tags(new_tags, gone_tags)`` is called,
533       and like in the protocol, if called while a test is active only applies
534       to that test. (Robert Collins)
535
536     * ``TestResultFilter`` takes a new optional constructor parameter 
537       ``filter_predicate``.  (Martin Pool)
538
539     * When a progress: directive is encountered in a subunit stream, the
540       python bindings now call the ``progress(offset, whence)`` method on
541       ``TestResult``.
542
543     * When a time: directive is encountered in a subunit stream, the python
544       bindings now call the ``time(seconds)`` method on ``TestResult``.
545
546   INTERNALS:
547
548     * (python) Added ``subunit.test_results.AutoTimingTestResultDecorator``. Most
549       users of subunit will want to wrap their ``TestProtocolClient`` objects
550       in this decorator to get test timing data for performance analysis.
551
552     * (python) ExecTestCase supports passing arguments to test scripts.
553
554     * (python) New helper ``subunit.test_results.HookedTestResultDecorator``
555       which can be used to call some code on every event, without having to
556       implement all the event methods.
557
558     * (python) ``TestProtocolClient.time(a_datetime)`` has been added which
559       causes a timestamp to be output to the stream.