← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~abentley/launchpad/fix-local-failures into lp:launchpad

 

Aaron Bentley has proposed merging lp:~abentley/launchpad/fix-local-failures into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)


= Summary =
Fix locally-failing tests.

== Proposed fix ==
See above

== Pre-implementation notes ==
None

== Implementation details ==
It appears that python2.6's str.decode can retrieve more of a broken string
than earlier versions.  This broke the _decode_header test by returning a
too-long string.  I have truncated the string so that python2.6 and earlier
versions each return the same result.

The geoip tests check timezone, but this is not a stable value, and it is
subject to political considerations.  On my machine, it produces
'America/Sao_Paulo' instead of 'Brazil/Acre'.  However, the lattitude and
longitude are still accurate, and this appears to be the purpose of the test.

The XML formatting of our dependency diagrams has changed, and they now include
an id before the title or href.  I've added elipses to compensate.

== Tests ==
bin/test -v -t lib/lp/services/geoip/tests/../doc/geoip.txt -t lib/lp/blueprints/tests/../stories/blueprints/xx-dependencies.txt -t lib/lp/blueprints/tests/../stories/blueprints/xx-non-ascii-imagemap.txt -t _decode_header

== Demo and Q/A ==
None


= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/canonical/launchpad/database/message.py
  lib/lp/blueprints/stories/blueprints/xx-non-ascii-imagemap.txt
  lib/lp/services/geoip/doc/geoip.txt
  lib/lp/blueprints/stories/blueprints/xx-dependencies.txt

./lib/canonical/launchpad/database/message.py
     197: W601 .has_key() is deprecated, use 'in'
     488: E202 whitespace before ')'
     530: E301 expected 1 blank line, found 0
     565: E202 whitespace before ')'
     581: E202 whitespace before ')'
./lib/lp/blueprints/stories/blueprints/xx-non-ascii-imagemap.txt
       3: source has bad indentation.
       6: source has bad indentation.
      14: source exceeds 78 characters.
      14: source has bad indentation.
      19: want exceeds 78 characters.
./lib/lp/blueprints/stories/blueprints/xx-dependencies.txt
       1: narrative uses a moin header.
      11: source has bad indentation.
      21: narrative uses a moin header.
      27: source has bad indentation.
      33: source has bad indentation.
      39: source has bad indentation.
      46: source exceeds 78 characters.
      61: source has bad indentation.
      68: narrative uses a moin header.
      74: source has bad indentation.
      80: source has bad indentation.
      86: source has bad indentation.
      99: source has bad indentation.
     108: source has bad indentation.
     115: source exceeds 78 characters.
     121: narrative uses a moin header.
     123: narrative uses a moin header.
     128: source has bad indentation.
     141: source has bad indentation.
     151: narrative uses a moin header.
     160: source has bad indentation.
     161: source exceeds 78 characters.
     169: narrative uses a moin header.
     174: source has bad indentation.
     185: source has bad indentation.
     195: narrative uses a moin header.
     204: source exceeds 78 characters.
     204: source has bad indentation.
     219: source has bad indentation.
     231: want exceeds 78 characters.
     237: source has bad indentation.
     247: source has bad indentation.
     255: narrative uses a moin header.
     260: source has bad indentation.
     269: source has bad indentation.
     279: source has bad indentation.
     282: narrative has trailing whitespace.
     283: source has bad indentation.
     289: source has bad indentation.
-- 
https://code.launchpad.net/~abentley/launchpad/fix-local-failures/+merge/39075
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~abentley/launchpad/fix-local-failures into lp:launchpad.
=== modified file 'lib/canonical/launchpad/database/message.py'
--- lib/canonical/launchpad/database/message.py	2010-10-03 15:30:06 +0000
+++ lib/canonical/launchpad/database/message.py	2010-10-21 18:16:48 +0000
@@ -236,8 +236,8 @@
         If the header isn't encoded properly, the characters that can't
         be decoded are replaced with unicode question marks.
 
-            >>> MessageSet()._decode_header('=?utf-8?q?F=F6=F6_b=E4r?=')
-            u'F\ufffd\ufffd'
+            >>> MessageSet()._decode_header('=?utf-8?q?F=F6?=')
+            u'F\ufffd'
         """
         # Unfold the header before decoding it.
         header = ''.join(header.splitlines())

=== modified file 'lib/lp/blueprints/stories/blueprints/xx-dependencies.txt'
--- lib/lp/blueprints/stories/blueprints/xx-dependencies.txt	2010-08-26 02:30:06 +0000
+++ lib/lp/blueprints/stories/blueprints/xx-dependencies.txt	2010-10-21 18:16:48 +0000
@@ -222,13 +222,13 @@
   <img src="deptree.png" usemap="#deptree" />
   <map id="deptree" name="deptree">
   <area shape="poly"
-    title="Support &lt;canvas&gt; Objects" .../>
-  <area shape="poly"
-    href="http://blueprints.launchpad.dev/firefox/+spec/e4x"; .../>
-  <area shape="poly"
-    href="http://blueprints.launchpad.dev/firefox/+spec/mergewin"; .../>
-  <area shape="poly"
-    href="http://blueprints.launchpad.dev/firefox/+spec/svg...support"; .../>
+    ...title="Support &lt;canvas&gt; Objects" .../>
+  <area shape="poly"
+    ...href="http://blueprints.launchpad.dev/firefox/+spec/e4x"; .../>
+  <area shape="poly"
+    ...href="http://blueprints.launchpad.dev/firefox/+spec/mergewin"; .../>
+  <area shape="poly"
+    ...href="http://blueprints.launchpad.dev/firefox/+spec/svg...support"; .../>
   </map>
 
 

=== modified file 'lib/lp/blueprints/stories/blueprints/xx-non-ascii-imagemap.txt'
--- lib/lp/blueprints/stories/blueprints/xx-non-ascii-imagemap.txt	2010-08-26 02:30:06 +0000
+++ lib/lp/blueprints/stories/blueprints/xx-non-ascii-imagemap.txt	2010-10-21 18:16:48 +0000
@@ -15,7 +15,7 @@
   >>> print anon_browser.contents
   <img ...
   <map id="deptree" name="deptree">
-  <area shape="poly" title="Support &lt;canvas&gt; Objects" .../>
+  <area shape="poly" ...title="Support &lt;canvas&gt; Objects" .../>
   <area shape="poly" ...title="A title with non&#45;ascii characters áã" .../>
   ...
 

=== modified file 'lib/lp/services/geoip/doc/geoip.txt'
--- lib/lp/services/geoip/doc/geoip.txt	2010-09-11 19:54:26 +0000
+++ lib/lp/services/geoip/doc/geoip.txt	2010-10-21 18:16:48 +0000
@@ -95,8 +95,6 @@
     -33...
     >>> geoip_request.longitude
     18...
-    >>> geoip_request.time_zone
-    'Africa/Johannesburg'
 
 If the request had an originating IP address, though, it'd be used when
 we adapted it into an IGeoIPRecord.
@@ -108,5 +106,3 @@
     -23...
     >>> geoip_request.longitude
     -45...
-    >>> geoip_request.time_zone
-    'Brazil/Acre'


Follow ups