)]}'
{"nova/tests/test_periodic_tasks.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"92efcc30d3d7dd483155e577524ac6f379370777","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from testtools.matchers import GreaterThan"},{"line_number":23,"context_line":"from testtools.matchers import LessThan"},{"line_number":24,"context_line":"from testtools.matchers import MatchesPredicate"},{"line_number":25,"context_line":"from testtools.matchers import Not"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from nova import manager"},{"line_number":28,"context_line":"from nova import test"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2Fc9E%3D","line":25,"updated":"2013-01-21 23:12:44.000000000","message":"I would rather you do \"from testtools import matchers\" and then use \"matchers.Contains\", etc.  This is, in fact, required by HACKING.rst…","commit_id":"234363dd1bd370ad9aeaf8324a80c14debd326b8"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"5e87ae21a7dad8bc2082aa0c6b971345247b5295","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from testtools.matchers import GreaterThan"},{"line_number":23,"context_line":"from testtools.matchers import LessThan"},{"line_number":24,"context_line":"from testtools.matchers import MatchesPredicate"},{"line_number":25,"context_line":"from testtools.matchers import Not"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from nova import manager"},{"line_number":28,"context_line":"from nova import test"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2Fa8w%3D","line":25,"in_reply_to":"AAAAM3%2F%2FbXU%3D","updated":"2013-01-23 05:28:03.000000000","message":"Ok, will change it here. Whats the process by which we change that list of exceptions? [and I don\u0027t see a /why/ in the HACKING.rst section on this, so its hard to reason about for folk like me who were not in the original discussions].","commit_id":"234363dd1bd370ad9aeaf8324a80c14debd326b8"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"9b760070d0b8180b2ff4bf24093bf70f02ab6461","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from testtools.matchers import GreaterThan"},{"line_number":23,"context_line":"from testtools.matchers import LessThan"},{"line_number":24,"context_line":"from testtools.matchers import MatchesPredicate"},{"line_number":25,"context_line":"from testtools.matchers import Not"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from nova import manager"},{"line_number":28,"context_line":"from nova import test"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FbXU%3D","line":25,"in_reply_to":"AAAAM3%2F%2FbZ8%3D","updated":"2013-01-22 22:49:09.000000000","message":"No, \"import *\" is also verboten.  HACKING.rst wants import of modules rather than objects, and the exceptions exist for very specific sections of code, e.g., the sqlalchemy stuff.","commit_id":"234363dd1bd370ad9aeaf8324a80c14debd326b8"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"7a5f1049d85293a3fad1681a0be3fac8aedba501","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from testtools.matchers import GreaterThan"},{"line_number":23,"context_line":"from testtools.matchers import LessThan"},{"line_number":24,"context_line":"from testtools.matchers import MatchesPredicate"},{"line_number":25,"context_line":"from testtools.matchers import Not"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from nova import manager"},{"line_number":28,"context_line":"from nova import test"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FbZ8%3D","line":25,"in_reply_to":"AAAAM3%2F%2Fc9E%3D","updated":"2013-01-22 22:21:46.000000000","message":"Could I do an import * then? The assertion lines get very long if you have to say matchers.Thing each time - which AFAICT is why the existing HACKING.rst exceptions are listed.","commit_id":"234363dd1bd370ad9aeaf8324a80c14debd326b8"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"92efcc30d3d7dd483155e577524ac6f379370777","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                return \u0027baz\u0027"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        m \u003d Manager()"},{"line_number":56,"context_line":"        self.assertThat(m._periodic_tasks, HasLength2)"},{"line_number":57,"context_line":"        self.assertEqual(None, m._periodic_spacing[\u0027foo\u0027])"},{"line_number":58,"context_line":"        self.assertEqual(4, m._periodic_spacing[\u0027bar\u0027])"},{"line_number":59,"context_line":"        self.assertThat(m._periodic_spacing, Not(Contains(\u0027baz\u0027)))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2Fc88%3D","line":56,"updated":"2013-01-21 23:12:44.000000000","message":"I really don\u0027t see the need for switching away from assertEqual() for this, TBH…","commit_id":"234363dd1bd370ad9aeaf8324a80c14debd326b8"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"5e87ae21a7dad8bc2082aa0c6b971345247b5295","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                return \u0027baz\u0027"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        m \u003d Manager()"},{"line_number":56,"context_line":"        self.assertThat(m._periodic_tasks, HasLength2)"},{"line_number":57,"context_line":"        self.assertEqual(None, m._periodic_spacing[\u0027foo\u0027])"},{"line_number":58,"context_line":"        self.assertEqual(4, m._periodic_spacing[\u0027bar\u0027])"},{"line_number":59,"context_line":"        self.assertThat(m._periodic_spacing, Not(Contains(\u0027baz\u0027)))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2Fa80%3D","line":56,"in_reply_to":"AAAAM3%2F%2FbXI%3D","updated":"2013-01-23 05:28:03.000000000","message":"RIght, thats precisely what the TODO I added is for: I\u0027ll separately land a patch upstream for HasLength(some-N)","commit_id":"234363dd1bd370ad9aeaf8324a80c14debd326b8"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"9b760070d0b8180b2ff4bf24093bf70f02ab6461","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                return \u0027baz\u0027"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        m \u003d Manager()"},{"line_number":56,"context_line":"        self.assertThat(m._periodic_tasks, HasLength2)"},{"line_number":57,"context_line":"        self.assertEqual(None, m._periodic_spacing[\u0027foo\u0027])"},{"line_number":58,"context_line":"        self.assertEqual(4, m._periodic_spacing[\u0027bar\u0027])"},{"line_number":59,"context_line":"        self.assertThat(m._periodic_spacing, Not(Contains(\u0027baz\u0027)))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FbXI%3D","line":56,"in_reply_to":"AAAAM3%2F%2FbaA%3D","updated":"2013-01-22 22:49:09.000000000","message":"I\u0027m not 100% convinced, since I would always interpret a test failure relative to the test code itself; that would suffice to tell me that there was a mismatch between the expected length of 2 and the actual length of 3.  I grant that assertThat() is very useful for other situations, such as comparing two XML documents, since it can reveal the exact differences between those two documents.\n\nWhat really bothers me is the hardcoding going on in HasLength1 and HasLength2; if you can reduce that to a single class that asserts that a list has a given length, I would be a bit happier.  By this I mean that the code would look more like \"self.assertThat(m._periodic_tasks, HasLength(2))\", although I\u0027d want to see the matcher in among the rest of the matchers code.","commit_id":"234363dd1bd370ad9aeaf8324a80c14debd326b8"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"7a5f1049d85293a3fad1681a0be3fac8aedba501","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                return \u0027baz\u0027"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        m \u003d Manager()"},{"line_number":56,"context_line":"        self.assertThat(m._periodic_tasks, HasLength2)"},{"line_number":57,"context_line":"        self.assertEqual(None, m._periodic_spacing[\u0027foo\u0027])"},{"line_number":58,"context_line":"        self.assertEqual(4, m._periodic_spacing[\u0027bar\u0027])"},{"line_number":59,"context_line":"        self.assertThat(m._periodic_spacing, Not(Contains(\u0027baz\u0027)))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FbaA%3D","line":56,"in_reply_to":"AAAAM3%2F%2Fc88%3D","updated":"2013-01-22 22:21:46.000000000","message":"Say there are three items in the list. The assertEqual will say\n2 !\u003d 3.\n\nThe assertThat will say \nlen([item1, item2, item3]), !\u003d 2\n\nWhich will let you figure out much more about what has happened from the error.","commit_id":"234363dd1bd370ad9aeaf8324a80c14debd326b8"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"46a33b1161c1209a0f7e614c7ab5c6c886fb61ed","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import time"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import fixtures"},{"line_number":21,"context_line":"from testtools import matchers"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from nova import manager"},{"line_number":24,"context_line":"from nova import test"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FaO8%3D","line":21,"updated":"2013-01-23 17:02:26.000000000","message":"I can\u0027t tell you the rationale for importing modules rather than objects; that discussion appears to have occurred before I started working on OpenStack.  Moreover, I know people who disagree with that restriction.  I personally don\u0027t see it as a big deal, but if it\u0027s to be changed, that should start off with a discussion on openstack-dev…","commit_id":"72bdf6c0d40f0be13a3e5fcbce26b7495985f1bf"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"ee14a6df34eb8a883c9235fc09ec38328dc439c2","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# TODO(lifeless): Will add generic version to testtools."},{"line_number":27,"context_line":"HasLength2 \u003d matchers.MatchesPredicate(lambda x: len(x) \u003d\u003d 2, \u0027len(%s) !\u003d 2\u0027)"},{"line_number":28,"context_line":"HasLength1 \u003d matchers.MatchesPredicate(lambda x: len(x) \u003d\u003d 1, \u0027len(%s) !\u003d 1\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class ManagerMetaTestCase(test.TestCase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FaqE%3D","line":28,"updated":"2013-01-23 12:13:02.000000000","message":"If we are adding new functions, even lambdas, it would be nice if there were tests for them as well to make sure they fail in the expected way. A whole watches the watcher approach.","commit_id":"72bdf6c0d40f0be13a3e5fcbce26b7495985f1bf"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"46a33b1161c1209a0f7e614c7ab5c6c886fb61ed","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# TODO(lifeless): Will add generic version to testtools."},{"line_number":27,"context_line":"HasLength2 \u003d matchers.MatchesPredicate(lambda x: len(x) \u003d\u003d 2, \u0027len(%s) !\u003d 2\u0027)"},{"line_number":28,"context_line":"HasLength1 \u003d matchers.MatchesPredicate(lambda x: len(x) \u003d\u003d 1, \u0027len(%s) !\u003d 1\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class ManagerMetaTestCase(test.TestCase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FaOo%3D","line":28,"in_reply_to":"AAAAM3%2F%2FaqE%3D","updated":"2013-01-23 17:02:26.000000000","message":"My preference is that this be made into a more generic matcher up front; I do not feel comfortable +2\u0027ing this code with these matchers hard-coded.","commit_id":"72bdf6c0d40f0be13a3e5fcbce26b7495985f1bf"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"46a33b1161c1209a0f7e614c7ab5c6c886fb61ed","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                return \u0027baz\u0027"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        m \u003d Manager()"},{"line_number":52,"context_line":"        self.assertThat(m._periodic_tasks, HasLength2)"},{"line_number":53,"context_line":"        self.assertEqual(None, m._periodic_spacing[\u0027foo\u0027])"},{"line_number":54,"context_line":"        self.assertEqual(4, m._periodic_spacing[\u0027bar\u0027])"},{"line_number":55,"context_line":"        self.assertThat("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FaOU%3D","line":52,"updated":"2013-01-23 17:02:26.000000000","message":"I really want to see that patch landed first, and this patch rebased on top of that one.  I just cannot feel comfortable with these hard-coded HasLength1 and HasLength2 matchers…","commit_id":"72bdf6c0d40f0be13a3e5fcbce26b7495985f1bf"}]}
