)]}'
{"tests/test_discover.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"fcaf86e87ea3e151ce672d65bd14cf32cc2ca05d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"import cStringIO"},{"line_number":2,"context_line":"import mock"},{"line_number":3,"context_line":"import pkg_resources"},{"line_number":4,"context_line":"import sys"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2Fv9w%3D","line":1,"updated":"2012-11-08 16:14:29.000000000","message":"Needs a copyright header; check out the other test_* files here…","commit_id":"d4cc31de0d862f6a37d1e59a67cbeb1db450f8d2"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"fcaf86e87ea3e151ce672d65bd14cf32cc2ca05d","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"class DiscoverTest(utils.TestCase):"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"    def test_discover_via_entry_points(self):"},{"line_number":14,"context_line":"        class Metadata(pkg_resources.EmptyProvider):"},{"line_number":15,"context_line":"            \"\"\""},{"line_number":16,"context_line":"            Mock object to return metadata as if from an on-disk distribution"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2Fv84%3D","line":13,"updated":"2012-11-08 16:14:29.000000000","message":"I\u0027m not certain why you structured the test this way.  I mean, sure, it\u0027ll work this way, but it seems to me there\u0027s substantially easier ways of performing this test.  For one, I don\u0027t see any need to subclass pkg_resources.EmptyProvider when using an appropriately configured Mock() object would probably be sufficient; two, you appear to be implementing a full-up functional test, when I\u0027m really only interested in seeing a unit test (i.e., testing just _discover_via_entry_points() and maybe a test on _discover_extensions()).  As an example of what I was more looking for, have a quick look at the ImportController tests in https://github.com/klmitch/appathy/blob/master/tests/unit/test_utils.py (source being tested is import_controller() in https://github.com/klmitch/appathy/blob/master/appathy/utils.py).\n\nThat said, as I say, this does the job, so I\u0027m not expecting you to do anything more here.","commit_id":"d4cc31de0d862f6a37d1e59a67cbeb1db450f8d2"}]}
