)]}'
{"doc/source/project-setup/python.rst":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"56ef1b1a3c01bd221953fed2a2e002dea30b28e0","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":".. _`testr`: https://wiki.openstack.org/wiki/Testr"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"nose"},{"line_number":174,"context_line":"----"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"If `nose`_ is in ``tox.ini``, for example::"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"  [testenv]"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"  ... \"nosetests {posargs}\""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"then run individual tests with the following syntax::"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"  $ tox -e \u003cenv\u003e -- --tests path.to.module:Class.test"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"So for example, run the list test in openstack/swift::"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"  $ tox -e py27 -- --tests test.unit.container.test_backend:TestContainerBroker.test_empty"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":".. _`nose`: https://nose.readthedocs.org/en/latest/"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_be5b5a52","line":188,"range":{"start_line":173,"start_character":0,"end_line":188,"end_character":90},"updated":"2019-06-19 14:32:35.000000000","message":"To be honest, this should probably be removed or at least prefaced with a warning: nose is dead at this point:\n\n\u003e Nose has been in maintenance mode for the past several years and will likely cease without a new person/team to take over maintainership. New projects should consider using Nose2, py.test, or just plain unittest/unittest2.\n\nFrom https://nose.readthedocs.io/en/latest/.\n\nNo one should be using anymore and we should make an effort to get the projects that are off of it (I see mistral and ec2-api locally)","commit_id":"ae63fe41252bae0e4aeeb7ebb7f7f5e82960a19e"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"4d8facb990feade2e74face2a44507ffd56b6347","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":".. _`testr`: https://wiki.openstack.org/wiki/Testr"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"nose"},{"line_number":174,"context_line":"----"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"If `nose`_ is in ``tox.ini``, for example::"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"  [testenv]"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"  ... \"nosetests {posargs}\""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"then run individual tests with the following syntax::"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"  $ tox -e \u003cenv\u003e -- --tests path.to.module:Class.test"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"So for example, run the list test in openstack/swift::"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"  $ tox -e py27 -- --tests test.unit.container.test_backend:TestContainerBroker.test_empty"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":".. _`nose`: https://nose.readthedocs.org/en/latest/"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_2dd65e51","line":188,"range":{"start_line":173,"start_character":0,"end_line":188,"end_character":90},"in_reply_to":"9fb8cfa7_37ed4d25","updated":"2019-06-19 17:36:38.000000000","message":"Done","commit_id":"ae63fe41252bae0e4aeeb7ebb7f7f5e82960a19e"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"1e1e71f33f7950692eab8d6760b9abcf37acbbf7","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":".. _`testr`: https://wiki.openstack.org/wiki/Testr"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"nose"},{"line_number":174,"context_line":"----"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"If `nose`_ is in ``tox.ini``, for example::"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"  [testenv]"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"  ... \"nosetests {posargs}\""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"then run individual tests with the following syntax::"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"  $ tox -e \u003cenv\u003e -- --tests path.to.module:Class.test"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"So for example, run the list test in openstack/swift::"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"  $ tox -e py27 -- --tests test.unit.container.test_backend:TestContainerBroker.test_empty"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":".. _`nose`: https://nose.readthedocs.org/en/latest/"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_e10cd795","line":188,"range":{"start_line":173,"start_character":0,"end_line":188,"end_character":90},"in_reply_to":"9fb8cfa7_be5b5a52","updated":"2019-06-19 15:08:55.000000000","message":"\u003e To be honest, this should probably be removed or at least prefaced\n \u003e with a warning: nose is dead at this point:\n \u003e \n \u003e \u003e Nose has been in maintenance mode for the past several years and\n \u003e will likely cease without a new person/team to take over\n \u003e maintainership. New projects should consider using Nose2, py.test,\n \u003e or just plain unittest/unittest2.\n \u003e \n \u003e From https://nose.readthedocs.io/en/latest/.\n \u003e \n \u003e No one should be using anymore and we should make an effort to get\n \u003e the projects that are off of it (I see mistral and ec2-api locally)\n\nWell switft also still uses it: https://opendev.org/openstack/swift/src/branch/master/tox.ini#L18 That\u0027s something I\u0027ve tried to change at more than one point in the past.\n\nBut I agree, I don\u0027t think we should put nose here since we don\u0027t want to encourage it\u0027s use, since it\u0027s deprecated (as is nose2 which was the attempt to revive it). We also do document in the PTI that stestr is what should be used: https://governance.openstack.org/tc/reference/pti/python.html#python-test-running","commit_id":"ae63fe41252bae0e4aeeb7ebb7f7f5e82960a19e"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"8ab8b5e1aa2948dbb7091785852232cdb335a4c4","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":".. _`testr`: https://wiki.openstack.org/wiki/Testr"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"nose"},{"line_number":174,"context_line":"----"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"If `nose`_ is in ``tox.ini``, for example::"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"  [testenv]"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"  ... \"nosetests {posargs}\""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"then run individual tests with the following syntax::"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"  $ tox -e \u003cenv\u003e -- --tests path.to.module:Class.test"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"So for example, run the list test in openstack/swift::"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"  $ tox -e py27 -- --tests test.unit.container.test_backend:TestContainerBroker.test_empty"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":".. _`nose`: https://nose.readthedocs.org/en/latest/"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_f45d73e9","line":188,"range":{"start_line":173,"start_character":0,"end_line":188,"end_character":90},"in_reply_to":"9fb8cfa7_e10cd795","updated":"2019-06-19 15:33:58.000000000","message":"OK, should I remove it here or in another commit?","commit_id":"ae63fe41252bae0e4aeeb7ebb7f7f5e82960a19e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"55083da5555f17a1b5fc2058121b582709103278","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":".. _`testr`: https://wiki.openstack.org/wiki/Testr"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"nose"},{"line_number":174,"context_line":"----"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"If `nose`_ is in ``tox.ini``, for example::"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"  [testenv]"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"  ... \"nosetests {posargs}\""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"then run individual tests with the following syntax::"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"  $ tox -e \u003cenv\u003e -- --tests path.to.module:Class.test"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"So for example, run the list test in openstack/swift::"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"  $ tox -e py27 -- --tests test.unit.container.test_backend:TestContainerBroker.test_empty"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":".. _`nose`: https://nose.readthedocs.org/en/latest/"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_37ed4d25","line":188,"range":{"start_line":173,"start_character":0,"end_line":188,"end_character":90},"in_reply_to":"9fb8cfa7_f45d73e9","updated":"2019-06-19 16:04:25.000000000","message":"Either-or is fine with me, though I\u0027d probably roll it into here. I called it out because there were some changes in this area.","commit_id":"ae63fe41252bae0e4aeeb7ebb7f7f5e82960a19e"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c53d7ccba43f14bba4d7e3ccf7f490c22548853d","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":"  envlist \u003d \u003clist of available environments\u003e"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"To run just one test suite in ``envlist``, execute::"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"  $ tox -e \u003cenv\u003e"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9fb8cfa7_8d0c2a43","line":106,"updated":"2019-06-19 18:14:48.000000000","message":"Not really related to this change, but stating just to state it - I think it might be good to update the envlist description to indicate it is only the \"default\" test environments that are run, not a list of all available environments. And this line isn\u0027t actually very accurate because you can run one test environment even if it is not listed in the envlist.\n\nJust putting that out here in case someone agrees and feels like doing a follow up patch.","commit_id":"86af3b332839f366f23adf625aa704e823b2b06f"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"7384dcb48a88cd1b5ceedc061142ffb9139cfb40","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":"  envlist \u003d \u003clist of available environments\u003e"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"To run just one test suite in ``envlist``, execute::"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"  $ tox -e \u003cenv\u003e"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9fb8cfa7_d234fae0","line":106,"in_reply_to":"9fb8cfa7_8d0c2a43","updated":"2019-06-19 20:41:45.000000000","message":"Done","commit_id":"86af3b332839f366f23adf625aa704e823b2b06f"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c53d7ccba43f14bba4d7e3ccf7f490c22548853d","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"testr"},{"line_number":158,"context_line":"-----"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"If `testr`_ is in ``tox.ini``, for example::"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"  [testenv]"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9fb8cfa7_0d303a07","line":159,"updated":"2019-06-19 18:14:48.000000000","message":"Should we add a note stating that the use of testr is not recommended for OpenStack projects and they should all update to using stestr?","commit_id":"86af3b332839f366f23adf625aa704e823b2b06f"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"7384dcb48a88cd1b5ceedc061142ffb9139cfb40","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"testr"},{"line_number":158,"context_line":"-----"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"If `testr`_ is in ``tox.ini``, for example::"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"  [testenv]"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9fb8cfa7_924c4277","line":159,"in_reply_to":"9fb8cfa7_0d303a07","updated":"2019-06-19 20:41:45.000000000","message":"Done","commit_id":"86af3b332839f366f23adf625aa704e823b2b06f"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c53d7ccba43f14bba4d7e3ccf7f490c22548853d","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":".. _`testr`: https://wiki.openstack.org/wiki/Testr"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"nose"},{"line_number":177,"context_line":"----"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"nose and nose2 are both deprecated and should not be used within"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9fb8cfa7_ad5b2e52","line":176,"updated":"2019-06-19 18:14:48.000000000","message":"I don\u0027t think nose is still in use anywhere. Should we just remove all mention of it?","commit_id":"86af3b332839f366f23adf625aa704e823b2b06f"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"7384dcb48a88cd1b5ceedc061142ffb9139cfb40","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":".. _`testr`: https://wiki.openstack.org/wiki/Testr"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"nose"},{"line_number":177,"context_line":"----"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"nose and nose2 are both deprecated and should not be used within"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9fb8cfa7_f2449e49","line":176,"in_reply_to":"9fb8cfa7_ad5b2e52","updated":"2019-06-19 20:41:45.000000000","message":"If someone can confirm 100% nose isn\u0027t used anywhere then yes we should remove in a follow-up.","commit_id":"86af3b332839f366f23adf625aa704e823b2b06f"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"a8463e7c4929e2c1a0c8b83100df1fc51e2ff885","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":".. warning::"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"   nose and nose2 are both deprecated and should not be used within"},{"line_number":163,"context_line":"   OpenStack.  Please use `stestr` instead as per above."},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"If `testr`_ is in ``tox.ini``, for example::"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9fb8cfa7_b278668f","line":162,"range":{"start_line":162,"start_character":3,"end_line":162,"end_character":26},"updated":"2019-06-19 21:03:50.000000000","message":"\"testr is\"?","commit_id":"00a0909312b8f9515272393b4a9942f93f3fbfaa"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"29838c1320b3d9105387bea5b1c03f00fd830f97","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":".. warning::"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"   nose and nose2 are both deprecated and should not be used within"},{"line_number":163,"context_line":"   OpenStack.  Please use `stestr` instead as per above."},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"If `testr`_ is in ``tox.ini``, for example::"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9fb8cfa7_a35fbae3","line":162,"range":{"start_line":162,"start_character":3,"end_line":162,"end_character":26},"in_reply_to":"9fb8cfa7_b278668f","updated":"2019-06-19 23:36:59.000000000","message":"Whoops, good catch thanks - fixed :)","commit_id":"00a0909312b8f9515272393b4a9942f93f3fbfaa"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"84faae8c5f04851edcbdb64fc0450376023ae321","unresolved":false,"context_lines":[{"line_number":78,"context_line":"needed by the project installed. It covers how to run the style check and unit"},{"line_number":79,"context_line":"tests. Both are run through `tox`_, so you need to install it::"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"  $ sudo pip install tox"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":".. _`tox`: https://tox.readthedocs.org/en/latest/"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_ae947ae9","line":81,"range":{"start_line":81,"start_character":0,"end_line":81,"end_character":24},"updated":"2019-06-20 09:48:53.000000000","message":"Unrelated, but the modern advice for this is:\n\n    $ pip install --user tox\n\n(or use your distro\u0027s package manager, though some distros don\u0027t package new enough versions, sadly)","commit_id":"3d79a1f13d6b66c0516a2c78be7e5f2ecedf66e5"},{"author":{"_account_id":5689,"name":"Masayuki Igawa","email":"masayuki@igawa.io","username":"igawa"},"change_message_id":"084e52252da95848e5377ddea51dc520248a7d84","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"  $ tox -e \u003cenv\u003e"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"so for example, run the test suite in the ``py27`` environment::"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"  $ tox -e py27"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_094fc534","line":110,"updated":"2019-06-20 03:10:04.000000000","message":"I think we should encourage developers to use python3 instead of py27 now. But yeah, it\u0027s a different topic..","commit_id":"3d79a1f13d6b66c0516a2c78be7e5f2ecedf66e5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"84faae8c5f04851edcbdb64fc0450376023ae321","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"Just run::"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"  $ tox -e pep8"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"Run individual tests with tox"},{"line_number":122,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_ee9112f3","line":119,"updated":"2019-06-20 09:48:53.000000000","message":"Unrelated, but for later patches: some projects use the \u0027linters\u0027 or \u0027style\u0027 target, I think","commit_id":"3d79a1f13d6b66c0516a2c78be7e5f2ecedf66e5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"84faae8c5f04851edcbdb64fc0450376023ae321","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":"then run individual tests with the following syntax::"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"  $ tox -e \u003cenv\u003e -- -n path.to.module.Class.test"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"So for example, run the ``test_memory_unlimited`` test in openstack/nova::"},{"line_number":139,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_cec9ae25","line":136,"range":{"start_line":136,"start_character":0,"end_line":136,"end_character":48},"updated":"2019-06-20 09:48:53.000000000","message":"I think this is incorrect. The \u0027-n\u0027 argument is used if you want to specify a filesystem path, not a Python module path. That means this should read:\n\n  $ tox -e \u003cenv\u003e path.to-module.Class.test\n\n(or)\n\n  $ tox -e \u003cenv\u003e -- path.to-module.Class.test\n\nThen, using filesystem paths:\n\n  $ tox -e \u003cenv\u003e -- -n path/to/module.py::Class.test","commit_id":"3d79a1f13d6b66c0516a2c78be7e5f2ecedf66e5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"38d21086260109dc668e0806d0986b9a5b9ee848","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":"then run individual tests with the following syntax::"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"  $ tox -e \u003cenv\u003e -- -n path.to.module.Class.test"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"So for example, run the ``test_memory_unlimited`` test in openstack/nova::"},{"line_number":139,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_ec2d9afd","line":136,"range":{"start_line":136,"start_character":0,"end_line":136,"end_character":48},"in_reply_to":"9fb8cfa7_ccbbf6e2","updated":"2019-06-20 12:04:26.000000000","message":"TIL","commit_id":"3d79a1f13d6b66c0516a2c78be7e5f2ecedf66e5"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"a5f1b993ef929618aa03068ac4597b29aaea887a","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":"then run individual tests with the following syntax::"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"  $ tox -e \u003cenv\u003e -- -n path.to.module.Class.test"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"So for example, run the ``test_memory_unlimited`` test in openstack/nova::"},{"line_number":139,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_ccbbf6e2","line":136,"range":{"start_line":136,"start_character":0,"end_line":136,"end_character":48},"in_reply_to":"9fb8cfa7_cec9ae25","updated":"2019-06-20 11:55:37.000000000","message":"Nope, it really works like this - try it :)  I\u0027ve been using\n\n    stestr run -n path.to-module.Class.test\n\ncountless times over the last few months.","commit_id":"3d79a1f13d6b66c0516a2c78be7e5f2ecedf66e5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"84faae8c5f04851edcbdb64fc0450376023ae321","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"So for example, run the ``test_memory_unlimited`` test in openstack/nova::"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"  $ tox -e py27 -- -n nova.tests.unit.compute.test_claims.ClaimTestCase.test_memory_unlimited"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"If you want to specify multiple tests via multiple command line"},{"line_number":143,"context_line":"arguments and/or via substring matching, just drop the ``-n`` option,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_8ed3b6d5","line":140,"updated":"2019-06-20 09:48:53.000000000","message":"Ditto","commit_id":"3d79a1f13d6b66c0516a2c78be7e5f2ecedf66e5"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"a5f1b993ef929618aa03068ac4597b29aaea887a","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"So for example, run the ``test_memory_unlimited`` test in openstack/nova::"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"  $ tox -e py27 -- -n nova.tests.unit.compute.test_claims.ClaimTestCase.test_memory_unlimited"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"If you want to specify multiple tests via multiple command line"},{"line_number":143,"context_line":"arguments and/or via substring matching, just drop the ``-n`` option,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_0cc90e77","line":140,"in_reply_to":"9fb8cfa7_8ed3b6d5","updated":"2019-06-20 11:55:37.000000000","message":"Ditto - it really works.","commit_id":"3d79a1f13d6b66c0516a2c78be7e5f2ecedf66e5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"84faae8c5f04851edcbdb64fc0450376023ae321","unresolved":false,"context_lines":[{"line_number":143,"context_line":"arguments and/or via substring matching, just drop the ``-n`` option,"},{"line_number":144,"context_line":"e.g.::"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"  $ tox -e py27 -- test_memory_unlimited test_memory_with_overhead"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"This actually causes `stestr` to internally build a list of all tests,"},{"line_number":149,"context_line":"and then run only those which contain one of the substrings provided"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_2edacae8","line":146,"updated":"2019-06-20 09:48:53.000000000","message":"This is correct (no \u0027-n\u0027 argument and explanation above and below is correct)","commit_id":"3d79a1f13d6b66c0516a2c78be7e5f2ecedf66e5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"84faae8c5f04851edcbdb64fc0450376023ae321","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"Debugging Python Unit Tests"},{"line_number":191,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"You can debug tests with `pdb`_. To begin, insert ``set_trace()`` where you"},{"line_number":194,"context_line":"wish to break::"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"  import pdb; pdb.set_trace()"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"If testr is in ``tox.ini``, the ``testtools.run`` command should be used to run"},{"line_number":199,"context_line":"tests. However, due to a `bug`_, it is not possible to simply pass a regex to"},{"line_number":200,"context_line":"this tool. Instead, first generate a list of tests to run and then pipe this"},{"line_number":201,"context_line":"list through ``testtools.run``::"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"  $ source .tox/py27/bin/activate"},{"line_number":204,"context_line":"  $ testr list-tests test_name_regex \u003e my-list"},{"line_number":205,"context_line":"  $ python -m testtools.run discover --load-list my-list"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"Alternatively, some projects provide a ``debug`` in their tox envlist, which is"},{"line_number":208,"context_line":"based on `oslo_debug_helper`_. Run individual tests with pdb enabled with the"},{"line_number":209,"context_line":"following syntax::"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"  $ tox -e debug -- path.to.module.Class.test"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":".. TODO(stephenfin): How to debug nose tests?"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_4efe1e39","line":211,"range":{"start_line":192,"start_character":0,"end_line":211,"end_character":45},"updated":"2019-06-20 09:48:53.000000000","message":"Unrelated, but a good later fix: I suspect very little, if any, of this applies to stestr. The bug is surely fixed there","commit_id":"3d79a1f13d6b66c0516a2c78be7e5f2ecedf66e5"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"a5f1b993ef929618aa03068ac4597b29aaea887a","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"Debugging Python Unit Tests"},{"line_number":191,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"You can debug tests with `pdb`_. To begin, insert ``set_trace()`` where you"},{"line_number":194,"context_line":"wish to break::"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"  import pdb; pdb.set_trace()"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"If testr is in ``tox.ini``, the ``testtools.run`` command should be used to run"},{"line_number":199,"context_line":"tests. However, due to a `bug`_, it is not possible to simply pass a regex to"},{"line_number":200,"context_line":"this tool. Instead, first generate a list of tests to run and then pipe this"},{"line_number":201,"context_line":"list through ``testtools.run``::"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"  $ source .tox/py27/bin/activate"},{"line_number":204,"context_line":"  $ testr list-tests test_name_regex \u003e my-list"},{"line_number":205,"context_line":"  $ python -m testtools.run discover --load-list my-list"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"Alternatively, some projects provide a ``debug`` in their tox envlist, which is"},{"line_number":208,"context_line":"based on `oslo_debug_helper`_. Run individual tests with pdb enabled with the"},{"line_number":209,"context_line":"following syntax::"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"  $ tox -e debug -- path.to.module.Class.test"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":".. TODO(stephenfin): How to debug nose tests?"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_6c78ca2a","line":211,"range":{"start_line":192,"start_character":0,"end_line":211,"end_character":45},"in_reply_to":"9fb8cfa7_4efe1e39","updated":"2019-06-20 11:55:37.000000000","message":"pdb only works under stestr with the -n option:\n\nhttps://github.com/mtreinish/stestr/issues/14","commit_id":"3d79a1f13d6b66c0516a2c78be7e5f2ecedf66e5"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"0f71a2ba957e99574e829bf125982fb295d6e291","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"Debugging Python Unit Tests"},{"line_number":191,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"You can debug tests with `pdb`_. To begin, insert ``set_trace()`` where you"},{"line_number":194,"context_line":"wish to break::"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"  import pdb; pdb.set_trace()"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"If testr is in ``tox.ini``, the ``testtools.run`` command should be used to run"},{"line_number":199,"context_line":"tests. However, due to a `bug`_, it is not possible to simply pass a regex to"},{"line_number":200,"context_line":"this tool. Instead, first generate a list of tests to run and then pipe this"},{"line_number":201,"context_line":"list through ``testtools.run``::"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"  $ source .tox/py27/bin/activate"},{"line_number":204,"context_line":"  $ testr list-tests test_name_regex \u003e my-list"},{"line_number":205,"context_line":"  $ python -m testtools.run discover --load-list my-list"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"Alternatively, some projects provide a ``debug`` in their tox envlist, which is"},{"line_number":208,"context_line":"based on `oslo_debug_helper`_. Run individual tests with pdb enabled with the"},{"line_number":209,"context_line":"following syntax::"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"  $ tox -e debug -- path.to.module.Class.test"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":".. TODO(stephenfin): How to debug nose tests?"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_a7ec9d8f","line":211,"range":{"start_line":192,"start_character":0,"end_line":211,"end_character":45},"in_reply_to":"9fb8cfa7_6c78ca2a","updated":"2019-06-20 13:15:35.000000000","message":"Definitely a follow on effort, but it might be good to pull this content in: https://docs.openstack.org/cinder/latest/contributor/testing.html#debugging","commit_id":"3d79a1f13d6b66c0516a2c78be7e5f2ecedf66e5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"84faae8c5f04851edcbdb64fc0450376023ae321","unresolved":false,"context_lines":[{"line_number":210,"context_line":""},{"line_number":211,"context_line":"  $ tox -e debug -- path.to.module.Class.test"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":".. TODO(stephenfin): How to debug nose tests?"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":".. _`pdb`: https://docs.python.org/3/library/pdb.html"},{"line_number":216,"context_line":".. _`bug`: https://bugs.launchpad.net/testrepository/+bug/902881"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_6ee9a27e","line":213,"updated":"2019-06-20 09:48:53.000000000","message":"I do not remember writing this whatsoever","commit_id":"3d79a1f13d6b66c0516a2c78be7e5f2ecedf66e5"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"a5f1b993ef929618aa03068ac4597b29aaea887a","unresolved":false,"context_lines":[{"line_number":210,"context_line":""},{"line_number":211,"context_line":"  $ tox -e debug -- path.to.module.Class.test"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":".. TODO(stephenfin): How to debug nose tests?"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":".. _`pdb`: https://docs.python.org/3/library/pdb.html"},{"line_number":216,"context_line":".. _`bug`: https://bugs.launchpad.net/testrepository/+bug/902881"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_0c77ce3c","line":213,"in_reply_to":"9fb8cfa7_6ee9a27e","updated":"2019-06-20 11:55:37.000000000","message":"Maybe you should remove it then ;-)","commit_id":"3d79a1f13d6b66c0516a2c78be7e5f2ecedf66e5"}]}
