)]}'
{"oslo_db/sqlalchemy/test_base.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"d90179834c74ec0dacc4e808427766c511477496","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        if is_package_level:"},{"line_number":277,"context_line":"            # tests have not been discovered for the package.  So"},{"line_number":278,"context_line":"            # discover them and add them to the suite."},{"line_number":279,"context_line":"            pkg_tests \u003d loader.discover(start_dir\u003dthis_dir, pattern\u003dpattern)"},{"line_number":280,"context_line":"            result.addTest(pkg_tests)"},{"line_number":281,"context_line":"        else:"},{"line_number":282,"context_line":"            # we\u0027re a module, and the tests are already discovered."}],"source_content_type":"text/x-python","patch_set":1,"id":"fad55976_3f9eca56","line":279,"updated":"2016-07-15 21:55:52.000000000","message":"so if optimize_db_test_loader() is placed *only* to __init__.py of a package we don\u0027t seem to call testscenarios.load_tests_apply_scenarios() anywhere. Is that expected?","commit_id":"314f0f4630a55280a103f06bef8b2b8d2abb2405"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"1dcd8c5085b4d1cb3ea58b71d54b98d6e2ce10c2","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        if is_package_level:"},{"line_number":277,"context_line":"            # tests have not been discovered for the package.  So"},{"line_number":278,"context_line":"            # discover them and add them to the suite."},{"line_number":279,"context_line":"            pkg_tests \u003d loader.discover(start_dir\u003dthis_dir, pattern\u003dpattern)"},{"line_number":280,"context_line":"            result.addTest(pkg_tests)"},{"line_number":281,"context_line":"        else:"},{"line_number":282,"context_line":"            # we\u0027re a module, and the tests are already discovered."}],"source_content_type":"text/x-python","patch_set":1,"id":"fad55976_c357ba00","line":279,"in_reply_to":"fad55976_3f9eca56","updated":"2016-07-16 02:09:07.000000000","message":"well it\u0027s documented here, and that\u0027s how this was working already, but I dont think anyone is using this thing at all.   However, I\u0027ve noticed that when Neutron for example is already using testscenarios, they already have a load_tests in the module since it\u0027s required.  I\u0027m not sure what happens if we put testscenarios expansion into the package level version of this, *and* in the module level.   The whole testresources/testscenarios thing IMO is not that easy to work with (And I\u0027ve been thinking about it for a long time) :/","commit_id":"314f0f4630a55280a103f06bef8b2b8d2abb2405"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"af55e77a5718d01dab2c6744a2855a3009494c7d","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        if is_package_level:"},{"line_number":277,"context_line":"            # tests have not been discovered for the package.  So"},{"line_number":278,"context_line":"            # discover them and add them to the suite."},{"line_number":279,"context_line":"            pkg_tests \u003d loader.discover(start_dir\u003dthis_dir, pattern\u003dpattern)"},{"line_number":280,"context_line":"            result.addTest(pkg_tests)"},{"line_number":281,"context_line":"        else:"},{"line_number":282,"context_line":"            # we\u0027re a module, and the tests are already discovered."}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_1dee5a22","line":279,"in_reply_to":"fad55976_c357ba00","updated":"2016-07-18 17:07:30.000000000","message":"Module level is probably fine, I think that\u0027s what most consuming projects will be looking for.","commit_id":"314f0f4630a55280a103f06bef8b2b8d2abb2405"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"270377e29f920aa4c523b6c5a58e7ba1e11eda00","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        # checking for filename \u003d\u003d \"__init__.py\" is another way to detect"},{"line_number":270,"context_line":"        # if we are package level or not.  Here, we test it against"},{"line_number":271,"context_line":"        # our other test as a sanity check."},{"line_number":272,"context_line":"        assert is_package_level is (os.path.basename(file_) \u003d\u003d \u0027__init__.py\u0027)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        result \u003d testresources.OptimisingTestSuite()"},{"line_number":275,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_73650644","line":272,"updated":"2016-07-18 18:24:30.000000000","message":"oops, this currently fails for me because of pyc files:\n\n-\u003e assert is_package_level is (os.path.basename(file_) \u003d\u003d \u0027__init__.py\u0027)\n(Pdb) file_\n\u0027/home/rpodolyaka/src/oslo.db/oslo_db/tests/sqlalchemy/__init__.pyc\u0027","commit_id":"9ded56575b69bfc82b0f5dc43b79ad7bb429d09b"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"12e960464035d6b1760b22ebce7e8e65829a9a0b","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        # determine if we need to do loader.discover()."},{"line_number":265,"context_line":"        # this should only be True if we\u0027re the __init__.py"},{"line_number":266,"context_line":"        # in a package, and not a module."},{"line_number":267,"context_line":"        is_package_level \u003d not list(found_tests)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        # checking for filename \u003d\u003d \"__init__.py\" is another way to detect"},{"line_number":270,"context_line":"        # if we are package level or not.  Here, we test it against"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_9f7852f4","line":267,"range":{"start_line":267,"start_character":47,"end_line":267,"end_character":48},"updated":"2016-07-28 22:54:14.000000000","message":"While it may be unusual, packages can totally have tests, so this will return True incorrectly in some projects and result in tests not being discovered.","commit_id":"1bd9690ffc65085b1e113fd76dd2840726a5ea0e"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"12e960464035d6b1760b22ebce7e8e65829a9a0b","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        # if we are package level or not.  Here, we test it against"},{"line_number":271,"context_line":"        # our other test as a sanity check."},{"line_number":272,"context_line":"        assert is_package_level is \\"},{"line_number":273,"context_line":"            os.path.basename(file_).startswith(\u0027__init__\u0027)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        result \u003d testresources.OptimisingTestSuite()"},{"line_number":276,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_df600a38","line":273,"updated":"2016-07-28 22:54:14.000000000","message":"And this is a problem for .zip bundled code I suspect (though I haven\u0027t tested it)","commit_id":"1bd9690ffc65085b1e113fd76dd2840726a5ea0e"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"12e960464035d6b1760b22ebce7e8e65829a9a0b","unresolved":false,"context_lines":[{"line_number":285,"context_line":"            result.addTests(testscenarios.generate_scenarios(found_tests))"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        return result"},{"line_number":288,"context_line":"    return load_tests"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_9fe692b2","line":288,"updated":"2016-07-28 22:54:14.000000000","message":"Rather than guessing at scope, I suggest just offering two different narrower functions, and let users import the one they want:\n\n from oslo_db.sqlalchemy.test_base import load_tests_module as load_tests","commit_id":"1bd9690ffc65085b1e113fd76dd2840726a5ea0e"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"7c69eb23599a0a212e5c6610e402cebf940fbb12","unresolved":false,"context_lines":[{"line_number":285,"context_line":"            result.addTests(testscenarios.generate_scenarios(found_tests))"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        return result"},{"line_number":288,"context_line":"    return load_tests"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_fbc98279","line":288,"in_reply_to":"bacf61ea_9fe692b2","updated":"2016-07-29 14:10:07.000000000","message":"I will sadly break into two functions, which means two new function names to distinguish them and this name gets deprecated.     In reality, I don\u0027t think anyone is using this function at all as nobody even noticed it was broken.  \n\nAs for load_tests(), for a single function that I would assume is trying to be simple, load_tests() has failed pretty badly.  This function is called in a wide array of contexts, using unittest, or unittest2, or testtools, or py2k, or py3k, or you did \"discover\", or you sent a module, and in all cases it behaves differently (for py2k vs. py3k, note the subtle difference between https://docs.python.org/2.7/library/unittest.html#load-tests-protocol and https://docs.python.org/3/library/unittest.html#load-tests-protocol - in py2k, \"*will* be called with the following arguments ... pattern\u003dNone\"; in py3k, \"pattern *defaults* to None\", and in fact it isn\u0027t None at all when we use testtools as far as I can see.  this quiet change in behavior is why the old version is broken).  Explicit vs. implicit would be beneficial here.","commit_id":"1bd9690ffc65085b1e113fd76dd2840726a5ea0e"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f1e8e375384b9ca02abf33f74cdea999972bf2db","unresolved":false,"context_lines":[{"line_number":285,"context_line":"            result.addTests(testscenarios.generate_scenarios(found_tests))"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        return result"},{"line_number":288,"context_line":"    return load_tests"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_59a3764f","line":288,"in_reply_to":"bacf61ea_fbc98279","updated":"2016-07-29 14:23:56.000000000","message":"I tried to use this and found it didn\u0027t work, but then the tests worked without it so I just put it on my list of things to figure out later.","commit_id":"1bd9690ffc65085b1e113fd76dd2840726a5ea0e"}],"oslo_db/tests/sqlalchemy/test_fixtures.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"d90179834c74ec0dacc4e808427766c511477496","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            isinstance(new_loader, testresources.OptimisingTestSuite)"},{"line_number":48,"context_line":"        )"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        actual_tests \u003d loader.discover(start_dir, pattern\u003d\"test_fixtures.py\")"},{"line_number":51,"context_line":"        self.assertEqual("},{"line_number":52,"context_line":"            new_loader.countTestCases(), actual_tests.countTestCases()"},{"line_number":53,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":1,"id":"fad55976_4d6af71b","line":50,"updated":"2016-07-15 21:55:52.000000000","message":"is found_tests above somehow modified in load_tests() so that we can no longer use it here?","commit_id":"314f0f4630a55280a103f06bef8b2b8d2abb2405"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"1dcd8c5085b4d1cb3ea58b71d54b98d6e2ce10c2","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            isinstance(new_loader, testresources.OptimisingTestSuite)"},{"line_number":48,"context_line":"        )"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        actual_tests \u003d loader.discover(start_dir, pattern\u003d\"test_fixtures.py\")"},{"line_number":51,"context_line":"        self.assertEqual("},{"line_number":52,"context_line":"            new_loader.countTestCases(), actual_tests.countTestCases()"},{"line_number":53,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":1,"id":"fad55976_63a08ef5","line":50,"in_reply_to":"fad55976_4d6af71b","updated":"2016-07-16 02:09:07.000000000","message":"we can use it here, because it is the same.  I had it like that originally, but for package tests, it\u0027s different.","commit_id":"314f0f4630a55280a103f06bef8b2b8d2abb2405"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"d90179834c74ec0dacc4e808427766c511477496","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            isinstance(new_loader, testresources.OptimisingTestSuite)"},{"line_number":67,"context_line":"        )"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        actual_tests \u003d loader.discover(start_dir, pattern\u003d\"test_fixtures.py\")"},{"line_number":70,"context_line":"        self.assertEqual("},{"line_number":71,"context_line":"            new_loader.countTestCases(), actual_tests.countTestCases()"},{"line_number":72,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":1,"id":"fad55976_0ded9f8b","line":69,"updated":"2016-07-15 21:55:52.000000000","message":"ditto: can we reuse the actual_tests value from above?","commit_id":"314f0f4630a55280a103f06bef8b2b8d2abb2405"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"1dcd8c5085b4d1cb3ea58b71d54b98d6e2ce10c2","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            isinstance(new_loader, testresources.OptimisingTestSuite)"},{"line_number":67,"context_line":"        )"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        actual_tests \u003d loader.discover(start_dir, pattern\u003d\"test_fixtures.py\")"},{"line_number":70,"context_line":"        self.assertEqual("},{"line_number":71,"context_line":"            new_loader.countTestCases(), actual_tests.countTestCases()"},{"line_number":72,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":1,"id":"fad55976_e3c11e82","line":69,"in_reply_to":"fad55976_0ded9f8b","updated":"2016-07-16 02:09:07.000000000","message":"this is just a bug, I have the same line twice.  Notice that found_tests is an empty collection here.   I just had to pdb into a real package/module setup to see how this silly load_tests() hook actually works b.c. the Python docs are not clear / consistent (another reason the whole testresources / testscenario thing \u003d\u003d very hard to work with).","commit_id":"314f0f4630a55280a103f06bef8b2b8d2abb2405"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"4974563bea8b7ae0eaa6fc27b1c8b40bedfc648f","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"class TestWScenarios(unittest.TestCase):"},{"line_number":91,"context_line":"    \"\"\"a \u0027do nothing\u0027 test suite that should generate exactly"},{"line_number":92,"context_line":"    four tests when testscenarios is used."},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_5691d098","line":91,"updated":"2016-07-18 18:35:41.000000000","message":"nit: pep8 is unhappy about this\n\n./oslo_db/tests/sqlalchemy/test_fixtures.py:94:1: H405  multi line docstring summary not separated with an empty line","commit_id":"9ded56575b69bfc82b0f5dc43b79ad7bb429d09b"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"0dce9693eb3f69899c2ece5bce945ecf4978806a","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def _all_tests_for_suite(self, suite):"},{"line_number":39,"context_line":"        for test in suite:"},{"line_number":40,"context_line":"            if isinstance(test, unittest.TestSuite):"},{"line_number":41,"context_line":"                for subtest in self._all_tests_for_suite(test):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dada55a8_96eea889","line":38,"updated":"2016-07-18 18:59:19.000000000","message":"hmm, where is this one called?","commit_id":"1d70af810c2a0d2ea3e90a7b27ab98ac2e1921bd"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"642b4fada4c2cb4f8f6bf93fc2f0c5afe80cefb9","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def _all_tests_for_suite(self, suite):"},{"line_number":39,"context_line":"        for test in suite:"},{"line_number":40,"context_line":"            if isinstance(test, unittest.TestSuite):"},{"line_number":41,"context_line":"                for subtest in self._all_tests_for_suite(test):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dada55a8_7c94b336","line":38,"in_reply_to":"dada55a8_96eea889","updated":"2016-07-18 19:31:44.000000000","message":"oh, i was going to use that for something that i changed my mind on.","commit_id":"1d70af810c2a0d2ea3e90a7b27ab98ac2e1921bd"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"2df3e314c95bdfe84db75bb6d8155f30db901d00","unresolved":false,"context_lines":[{"line_number":82,"context_line":"class TestWScenarios(unittest.TestCase):"},{"line_number":83,"context_line":"    \"\"\"a \u0027do nothing\u0027 test suite."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    Should generate exactly four tests when testscenarios is used."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    \"\"\""},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dada55a8_cc64d6e6","line":85,"updated":"2016-07-19 17:06:29.000000000","message":"not sure if we can assert on this programatically, but manual check shows that it\u0027s indeed 4 tests discovered (unless you point testtools to TestWScenarios class directly, in which case testscenarious won\u0027t generate test cases, but as I understand that\u0027s expected, if you don\u0027t run tests for a module or package)","commit_id":"1bd9690ffc65085b1e113fd76dd2840726a5ea0e"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"e6f3fa6c09712ac19465dde2bab9c29867ee71f6","unresolved":false,"context_lines":[{"line_number":82,"context_line":"class TestWScenarios(unittest.TestCase):"},{"line_number":83,"context_line":"    \"\"\"a \u0027do nothing\u0027 test suite."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    Should generate exactly four tests when testscenarios is used."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    \"\"\""},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dada55a8_efc54c8e","line":85,"in_reply_to":"dada55a8_cc64d6e6","updated":"2016-07-19 17:28:27.000000000","message":"right we\u0027re only testing that our hook does the right thing when it\u0027s actually called.  if testtools etc. isn\u0027t calling load_tests, that\u0027s a different (upstream) issue.","commit_id":"1bd9690ffc65085b1e113fd76dd2840726a5ea0e"}]}
