Merge lp:~garyvdm/bzr/test_no_pyqt_import into lp:bzr

Proposed by Gary van der Merwe
Status: Work in progress
Proposed branch: lp:~garyvdm/bzr/test_no_pyqt_import
Merge into: lp:bzr
Diff against target: 35 lines (+6/-1)
2 files modified
NEWS (+3/-0)
bzrlib/tests/test_import_tariff.py (+3/-1)
To merge this branch: bzr merge lp:~garyvdm/bzr/test_no_pyqt_import
Reviewer Review Type Date Requested Status
Martin Packman (community) Approve
bzr-core Pending
Review via email: mp+26807@code.launchpad.net

Commit message

Check the PyQt4 is not imported for bzr status.

Description of the change

This makes test_import_tariff.TestImportTariffs.test_simple_local check that PyQt4 is not imported when bzr st is run.

It also has a drive by fix to make test_import_tariff.TestImportTariffs.test_simple_local pass the new 'BZR_DISABLE_PLUGINS' and 'BZR_PLUGINS_AT' envars to the supprocess used in the test.

(This should probably be move to run_bzr_subprocess, but I'll do that in another proposal.)

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

Small change, and altered test passes here. Shouldn't this sort of thing be really be done in the qbzr tests by inheriting from TestImportTariffs though? This way at least gets it tested now, rather than waiting for automated plugin tests though.

review: Approve
Revision history for this message
Gary van der Merwe (garyvdm) wrote :

On Mon, Jun 7, 2010 at 11:01 PM, Martin [gz] <email address hidden> wrote:
> Shouldn't this sort of thing be really be done in the qbzr tests by inheriting from TestImportTariffs though? This way at least gets it tested now, rather than waiting for automated plugin tests though.

That makes more sense. I'll do that rather.

Revision history for this message
John A Meinel (jameinel) wrote :

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

Gary van der Merwe wrote:
> Gary van der Merwe has proposed merging lp:~garyvdm/bzr/test_no_pyqt_import into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
>
>
> This makes test_import_tariff.TestImportTariffs.test_simple_local check that PyQt4 is not imported when bzr st is run.
>
> It also has a drive by fix to make test_import_tariff.TestImportTariffs.test_simple_local pass the new 'BZR_DISABLE_PLUGINS' and 'BZR_PLUGINS_AT' envars to the supprocess used in the test.
>
> (This should probably be move to run_bzr_subprocess, but I'll do that in another proposal.)
>

Honestly, I would be fine with always asserting this, and not just when
qbzr is installed. :)

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwNY3sACgkQJdeBCYSNAANmDgCghhPZ12ZvjTvIGFYcyVHtzzB3
4PgAnA8ENYVPO0DIza575mYM1+4r/hI6
=+Uqs
-----END PGP SIGNATURE-----

Unmerged revisions

5284. By Gary van der Merwe

Check the PyQt4 is not imported for status.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2010-06-04 11:26:53 +0000
3+++ NEWS 2010-06-04 13:55:38 +0000
4@@ -65,6 +65,9 @@
5 Testing
6 *******
7
8+* test_import_tariff.TestImportTariffs.test_simple_local now checks that PyQt4
9+ is not imported. (Gary van der Merwe)
10+
11
12 bzr 2.2b3
13 #########
14
15=== modified file 'bzrlib/tests/test_import_tariff.py'
16--- bzrlib/tests/test_import_tariff.py 2010-06-04 03:09:35 +0000
17+++ bzrlib/tests/test_import_tariff.py 2010-06-04 13:55:38 +0000
18@@ -55,7 +55,8 @@
19 # explicitly do want to test against things installed there, therefore
20 # we pass it through.
21 env_changes = dict(PYTHONVERBOSE='1')
22- for name in ['BZR_HOME', 'BZR_PLUGIN_PATH', 'HOME',]:
23+ for name in ['BZR_HOME', 'BZR_PLUGIN_PATH', 'HOME',
24+ 'BZR_DISABLE_PLUGINS', 'BZR_PLUGINS_AT']:
25 env_changes[name] = self._old_env.get(name)
26 out, err = self.run_bzr_subprocess(args,
27 allow_plugins=(not are_plugins_disabled()),
28@@ -102,6 +103,7 @@
29 'kerberos',
30 'smtplib',
31 'tarfile',
32+ 'PyQt4',
33 ])
34 # TODO: similar test for repository-only operations, checking we avoid
35 # loading wt-specific stuff