Merge lp:~soren/bzr/lp701898 into lp:bzr

Proposed by Soren Hansen
Status: Merged
Approved by: Martin Pool
Approved revision: no longer in the source branch.
Merged at revision: 5600
Proposed branch: lp:~soren/bzr/lp701898
Merge into: lp:bzr
Diff against target: 38 lines (+5/-1)
3 files modified
bzrlib/tests/__init__.py (+4/-0)
bzrlib/tests/test_version_info.py (+1/-0)
bzrlib/version_info_formats/format_python.py (+0/-1)
To merge this branch: bzr merge lp:~soren/bzr/lp701898
Reviewer Review Type Date Requested Status
Martin Pool Approve
John A Meinel Approve
Review via email: mp+45991@code.launchpad.net

Commit message

Fix PEP-8 violation in PythonVersionInfoBuilder's output

Description of the change

Fix PEP-8 violation in PythonVersionInfoBuilder's output

 * Add a assertNotContainsString method to TestCase class.
 * Add a test for too many linefeeds in a row in PythonVersionInfoBuilder's
   output.
 * Remove a superfluous linefeed in PythonVersionInfoBuilder's footer.

To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

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

On 1/12/2011 8:12 AM, Soren Hansen wrote:
> Soren Hansen has proposed merging lp:~soren/bzr/lp701898 into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
> Related bugs:
> #701898 "bzr version-info --python" does not give pep-8 compliant output
> https://bugs.launchpad.net/bugs/701898
>
> For more details, see:
> https://code.launchpad.net/~soren/bzr/lp701898/+merge/45991
>
> Fix PEP-8 violation in PythonVersionInfoBuilder's output
>
> * Add a assertNotContainsString method to TestCase class.
> * Add a test for too many linefeeds in a row in PythonVersionInfoBuilder's
> output.
> * Remove a superfluous linefeed in PythonVersionInfoBuilder's footer.
>
 review: approve

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

iEYEARECAAYFAk0t0VUACgkQJdeBCYSNAANH9wCgrBGBbfdIKAiAK5DrdaEz4khu
+dkAoJNy1UxC9bzkXhFqH/TRHaGkF9q9
=Y0n8
-----END PGP SIGNATURE-----

review: Approve
Revision history for this message
Martin Pool (mbp) wrote :

  merge approve

review: Approve
Revision history for this message
Vincent Ladeuil (vila) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/tests/__init__.py'
2--- bzrlib/tests/__init__.py 2011-01-07 11:13:50 +0000
3+++ bzrlib/tests/__init__.py 2011-01-12 14:11:57 +0000
4@@ -1336,6 +1336,10 @@
5 if haystack.find(needle) == -1:
6 self.fail("string %r not found in '''%s'''" % (needle, haystack))
7
8+ def assertNotContainsString(self, haystack, needle):
9+ if haystack.find(needle) != -1:
10+ self.fail("string %r found in '''%s'''" % (needle, haystack))
11+
12 def assertSubset(self, sublist, superlist):
13 """Assert that every entry in sublist is present in superlist."""
14 missing = set(sublist) - set(superlist)
15
16=== modified file 'bzrlib/tests/test_version_info.py'
17--- bzrlib/tests/test_version_info.py 2010-12-24 22:40:27 +0000
18+++ bzrlib/tests/test_version_info.py 2011-01-12 14:11:57 +0000
19@@ -192,6 +192,7 @@
20 val = sio.getvalue()
21 self.assertContainsRe(val, "'revision_id': None")
22 self.assertContainsRe(val, "'revno': 0")
23+ self.assertNotContainsString(val, '\n\n\n\n')
24
25 def test_python_version(self):
26 wt = self.create_branch()
27
28=== modified file 'bzrlib/version_info_formats/format_python.py'
29--- bzrlib/version_info_formats/format_python.py 2009-04-03 21:23:55 +0000
30+++ bzrlib/version_info_formats/format_python.py 2011-01-12 14:11:57 +0000
31@@ -38,7 +38,6 @@
32
33
34 _py_version_footer = '''
35-
36 if __name__ == '__main__':
37 print 'revision: %(revno)d' % version_info
38 print 'nick: %(branch_nick)s' % version_info