)]}'
{"tempest/scenario/utils.py":[{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"db0eda98d19b378bca4b0dce17b414edd240d62f","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        scenario_flavor \u003d scenario_utils.scenario_flavors"},{"line_number":158,"context_line":"        scenario_image \u003d scenario_utils.scenario_images"},{"line_number":159,"context_line":"    except exceptions.InvalidConfiguration:"},{"line_number":160,"context_line":"        return standard_tests"},{"line_number":161,"context_line":"    for test in testtools.iterate_tests(standard_tests):"},{"line_number":162,"context_line":"        setattr(test, \u0027scenarios\u0027, testscenarios.multiply_scenarios("},{"line_number":163,"context_line":"            scenario_image,"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_354c21c8","line":160,"updated":"2014-10-07 06:54:54.000000000","message":"What would that mean if you really have an InvalidConfiguration in place? It skips the basic_ops scenario tests without any notice. Not sure if we really want that?","commit_id":"4a5987ae2bf795e1535cfd8e773f4998dad6b272"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"fefb80c213cfe7efc8dde876fa5834a77f72b09f","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        scenario_flavor \u003d scenario_utils.scenario_flavors"},{"line_number":158,"context_line":"        scenario_image \u003d scenario_utils.scenario_images"},{"line_number":159,"context_line":"    except exceptions.InvalidConfiguration:"},{"line_number":160,"context_line":"        return standard_tests"},{"line_number":161,"context_line":"    for test in testtools.iterate_tests(standard_tests):"},{"line_number":162,"context_line":"        setattr(test, \u0027scenarios\u0027, testscenarios.multiply_scenarios("},{"line_number":163,"context_line":"            scenario_image,"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_ac8fe373","line":160,"in_reply_to":"baa201ad_354c21c8","updated":"2014-10-07 14:27:19.000000000","message":"That\u0027s a fair point which I didn\u0027t consider, but I\u0027m not sure how to handle it honestly. The issue is because this gets run by the test loader if there is an exception raised the test will get magically skipped anyway. This is because unittest changes the test_id by prepending the internal loader exception module path to the test module name. But in that case it won\u0027t even show up in the list of run tests (assuming you are running with a testr regex) It will fail without a regex though because it will try to load a test starting with a unittest exception module. (although a list tests will still return 0, which is why the unitest checks the return code and the entries in the list)\n\nThat being said I\u0027m also not sure this will result in a skipped test if there is a legitimate configuration error. IIUC returning standard_tests in the loader method will just return what discovery would normally have. To use test_server_basic_ops as an example (I think it\u0027s the only current place this is used) if there is a config error I would expect the runner to attempt to run that test case because normally discovery would have picked it up. The test will then fail during setUp() because the config file is invalid. But, I haven\u0027t tested this so I\u0027m not sure.","commit_id":"4a5987ae2bf795e1535cfd8e773f4998dad6b272"}],"tempest/tests/test_list_tests.py":[{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"db0eda98d19b378bca4b0dce17b414edd240d62f","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class TestTestList(base.TestCase):"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def test_no_import_errors(self):"},{"line_number":25,"context_line":"        # Remove unit test discover path from env to test tempest tests"},{"line_number":26,"context_line":"        test_env \u003d os.environ.copy()"},{"line_number":27,"context_line":"        test_env.pop(\u0027OS_TEST_PATH\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_d5a2f549","line":24,"updated":"2014-10-07 06:54:54.000000000","message":"Not sure if the test name is fully sufficient here. A testr run isn\u0027t a simple \"import\" of all test modules it\u0027s a \"list-tests\".","commit_id":"4a5987ae2bf795e1535cfd8e773f4998dad6b272"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"fefb80c213cfe7efc8dde876fa5834a77f72b09f","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class TestTestList(base.TestCase):"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def test_no_import_errors(self):"},{"line_number":25,"context_line":"        # Remove unit test discover path from env to test tempest tests"},{"line_number":26,"context_line":"        test_env \u003d os.environ.copy()"},{"line_number":27,"context_line":"        test_env.pop(\u0027OS_TEST_PATH\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_fe50b133","line":24,"in_reply_to":"baa201ad_d5a2f549","updated":"2014-10-07 14:27:19.000000000","message":"Good point, I\u0027ll update the name","commit_id":"4a5987ae2bf795e1535cfd8e773f4998dad6b272"},{"author":{"_account_id":1192,"name":"David Kranz","email":"dkranz@redhat.com","username":"david-kranz"},"change_message_id":"b18d08efc9b31661b18095e9e4a056973e0a3a03","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        p \u003d subprocess.Popen([\u0027testr\u0027, \u0027list-tests\u0027], stdout\u003dsubprocess.PIPE,"},{"line_number":30,"context_line":"                             env\u003dtest_env)"},{"line_number":31,"context_line":"        ids, err \u003d p.communicate()"},{"line_number":32,"context_line":"        self.assertEqual(0, p.returncode,"},{"line_number":33,"context_line":"                         \"test discovery failed, one or more files cause an \""},{"line_number":34,"context_line":"                         \"error on import\")"},{"line_number":35,"context_line":"        ids \u003d ids.split(\u0027\\n\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_96005703","line":32,"updated":"2014-11-17 21:21:19.000000000","message":"Shouldn\u0027t the failure message include the contents of \"err\"?","commit_id":"a0f820f3729dbcc8da34a8ce99136fb033c030b5"},{"author":{"_account_id":1192,"name":"David Kranz","email":"dkranz@redhat.com","username":"david-kranz"},"change_message_id":"953d194af476c600a830d3987e588bd70a4e0d2d","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        p \u003d subprocess.Popen([\u0027testr\u0027, \u0027list-tests\u0027], stdout\u003dsubprocess.PIPE,"},{"line_number":30,"context_line":"                             env\u003dtest_env)"},{"line_number":31,"context_line":"        ids, err \u003d p.communicate()"},{"line_number":32,"context_line":"        self.assertEqual(0, p.returncode,"},{"line_number":33,"context_line":"                         \"test discovery failed, one or more files cause an \""},{"line_number":34,"context_line":"                         \"error on import\")"},{"line_number":35,"context_line":"        ids \u003d ids.split(\u0027\\n\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_adfddd3d","line":32,"in_reply_to":"5a890539_82e00cce","updated":"2014-11-18 17:14:26.000000000","message":"ok","commit_id":"a0f820f3729dbcc8da34a8ce99136fb033c030b5"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"458f2fb0a2e591bea0f00302fcdbcee29eeaac2e","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        p \u003d subprocess.Popen([\u0027testr\u0027, \u0027list-tests\u0027], stdout\u003dsubprocess.PIPE,"},{"line_number":30,"context_line":"                             env\u003dtest_env)"},{"line_number":31,"context_line":"        ids, err \u003d p.communicate()"},{"line_number":32,"context_line":"        self.assertEqual(0, p.returncode,"},{"line_number":33,"context_line":"                         \"test discovery failed, one or more files cause an \""},{"line_number":34,"context_line":"                         \"error on import\")"},{"line_number":35,"context_line":"        ids \u003d ids.split(\u0027\\n\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_82e00cce","line":32,"in_reply_to":"5a890539_96005703","updated":"2014-11-18 00:20:32.000000000","message":"So, the output of stderr is actually not useful. During an import failure it is just:\n\n  Non-zero exit code (2) from test listing\n\nStdout would contain a listing of the import failures as well as the other normal testr output before the list tests. That of course also assumes on having basically the latest versions of the testr, subunit, testtools stack. I erred on the side of caution by not printing it, I think it\u0027s better to get get the test working again for now.\n\nI think for a follow-on patch I can look at adding a method to parse stdout when it fails and grab the list if it exists; since it\u0027ll be a bit more work.","commit_id":"a0f820f3729dbcc8da34a8ce99136fb033c030b5"}]}
