Merge lp:~jameinel/bzr/2.1.0b4-win32-test-imports into lp:bzr

Proposed by John A Meinel on 2009-12-09
Status: Merged
Approved by: Martin Pool on 2009-12-10
Approved revision: 4877
Merged at revision: not available
Proposed branch: lp:~jameinel/bzr/2.1.0b4-win32-test-imports
Merge into: lp:bzr
Diff against target: 41 lines (+20/-0)
2 files modified
NEWS (+5/-0)
doc/developers/testing.txt (+15/-0)
To merge this branch: bzr merge lp:~jameinel/bzr/2.1.0b4-win32-test-imports
Reviewer Review Type Date Requested Status
Martin Pool 2009-12-09 Approve on 2009-12-10
Review via email: mp+15877@code.launchpad.net
To post a comment you must log in.
John A Meinel (jameinel) wrote :

This is the NEWS entry and testing paragraph that Martin mentioned. I like it enough, but I figured I'd check before landing.

Martin Pool (mbp) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

  vote approve
  status approved

Perfect
- --
Martin <http://launchpad.net/~mbp/>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAksgRBgACgkQPGPKP6Cz6IsfRgCglZ7JDaseYbGE30ofL3hRKf6/
z9QAniLTXzMmSocTNjlqw0pyjSVm1MHc
=X5nm
-----END PGP SIGNATURE-----

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2009-12-09 05:47:32 +0000
3+++ NEWS 2009-12-09 15:50:30 +0000
4@@ -116,6 +116,11 @@
5 Internals
6 *********
7
8+* New test Feature: ``ModuleAvailableFeature``. It is designed to make it
9+ easier to handle what tests you want to run based on what modules can be
10+ imported. (Rather than lots of custom-implemented features that were
11+ basically copy-and-pasted.) (John Arbash Meinel)
12+
13 * Several code paths that were calling ``Transport.get().read()`` have
14 been changed to the equalivent ``Transport.get_bytes()``. The main
15 difference is that the latter will explicitly call ``file.close()``,
16
17=== modified file 'doc/developers/testing.txt'
18--- doc/developers/testing.txt 2009-12-02 20:34:07 +0000
19+++ doc/developers/testing.txt 2009-12-09 15:50:30 +0000
20@@ -353,6 +353,21 @@
21 KnownFailure should be used with care as we don't want a
22 proliferation of quietly broken tests.
23
24+ModuleAvailableFeature
25+ A helper for handling running tests based on whether a python
26+ module is available. This can handle 3rd-party dependencies (is
27+ ``paramiko`` available?) as well as stdlib (``termios``) or
28+ extension modules (``bzrlib._groupcompress_pyx``). You create a
29+ new feature instance with::
30+
31+ MyModuleFeature = ModuleAvailableFeature('bzrlib.something')
32+
33+ ...
34+ def test_something(self):
35+ self.requireFeature(MyModuleFeature)
36+ something = MyModuleFeature.module
37+
38+
39 We plan to support three modes for running the test suite to control the
40 interpretation of these results. Strict mode is for use in situations
41 like merges to the mainline and releases where we want to make sure that