← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~james-w/launchpad/devel into lp:launchpad/devel

 

James Westby has proposed merging lp:~james-w/launchpad/devel into lp:launchpad/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)


Don't create a callable just to return the value of another. Thanks Rob.
-- 
https://code.launchpad.net/~james-w/launchpad/devel/+merge/30887
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~james-w/launchpad/devel into lp:launchpad/devel.
=== modified file 'lib/lp/testing/__init__.py'
--- lib/lp/testing/__init__.py	2010-07-23 21:43:05 +0000
+++ lib/lp/testing/__init__.py	2010-07-25 09:43:50 +0000
@@ -432,10 +432,8 @@
             content_type = testtools.content_type.ContentType(
                 "text", "plain", {"charset": "utf8"})
             for (i, oops) in enumerate(self.oopses):
-                def get_oops_content():
-                    return oops.get_chunks()
                 content = testtools.content.Content(
-                    content_type, get_oops_content)
+                    content_type, oops.get_chunks)
                 self.addDetail("oops-%d" % i, content)
 
     def setUp(self):

=== modified file 'lib/lp/testing/tests/test_testcase.py'
--- lib/lp/testing/tests/test_testcase.py	2010-07-23 13:50:42 +0000
+++ lib/lp/testing/tests/test_testcase.py	2010-07-25 09:43:50 +0000
@@ -86,7 +86,7 @@
         oops = errorlog.globalErrorUtility.getLastOopsReport()
         # We have to serialise and read in again, as that is what
         # getLastOopsReport does, and doing so changes whether the
-        # timezone is in the timestamp
+        # timezone is in the timestamp.
         content = StringIO()
         content.writelines(self.getDetails()['oops-0'].iter_text())
         content.seek(0)


Follow ups