{ "info": { "author": "Joe Esposito", "author_email": "joe@joeyespo.com", "bugtrack_url": null, "classifiers": [], "description": "pytest-watch \u2013 Continuous pytest runner\n=======================================\n\n`Current version on PyPI `__\n`Say Thanks! `__\n\n**pytest-watch** a zero-config CLI tool that runs\n`pytest `__, and re-runs it when a file in your\nproject changes. It beeps on failures and can run arbitrary commands on\neach passing and failing test run.\n\nMotivation\n----------\n\nWhether or not you use the test-driven development method, running tests\ncontinuously is far more productive than waiting until you\u2019re finished\nprogramming to test your code. Additionally, manually running\n``py.test`` each time you want to see if any tests were broken has more\nwait-time and cognitive overhead than merely listening for a\nnotification. This could be a crucial difference when debugging a\ncomplex problem or on a tight deadline.\n\nInstallation\n------------\n\n.. code:: bash\n\n $ pip install pytest-watch\n\nUsage\n-----\n\n.. code:: bash\n\n $ cd myproject\n $ ptw\n * Watching /path/to/myproject\n\n*Note: It can also be run using its full name ``pytest-watch``.*\n\nNow develop normally and check the terminal every now and then to see if\nany tests are broken. Alternatively, pytest-watch can **notify you**\nwhen tests pass or fail:\n\n- **OSX**\n\n ``$ ptw --onpass \"say passed\" --onfail \"say failed\"``\n\n .. code:: bash\n\n $ ptw --onpass \"growlnotify -m \\\"All tests passed!\\\"\" \\\n --onfail \"growlnotify -m \\\"Tests failed\\\"\"\n\n using `GrowlNotify `__.\n\n- **Windows**\n\n .. code:: bat\n\n > ptw --onfail flash\n\n using `Console Flash `__\n\nYou can also run a command before the tests run, e.g.\u00a0seeding your test\ndatabase:\n\n.. code:: bash\n\n $ ptw --beforerun init_db.py\n\nOr after they finish, e.g.\u00a0deleting a sqlite file. Note that this script\nreceives the exit code of ``py.test`` as an argument.\n\n.. code:: bash\n\n $ ptw --afterrun cleanup_db.py\n\nYou can also use a custom runner script for full ``py.test`` control:\n\n.. code:: bash\n\n $ ptw --runner \"python custom_pytest_runner.py\"\n\nHere\u2019s an minimal runner script that runs ``py.test`` and prints its\nexit code:\n\n.. code:: py\n\n # custom_pytest_runner.py\n\n import sys\n import pytest\n\n print('py.test exited with code:', pytest.main(sys.argv[1:]))\n\nNeed to exclude directories from being observed or collected for tests?\n\n.. code:: bash\n\n $ ptw --ignore ./deep-directory --ignore ./integration_tests\n\nSee the full list of options:\n\n::\n\n $ ptw --help\n Usage: ptw [options] [--ignore ...] [...] [-- ...]\n\n Options:\n --ignore Ignore directory from being watched and during\n collection (multi-allowed).\n --ext Comma-separated list of file extensions that can\n trigger a new test run when changed (default: .py).\n Use --ext=* to allow any file (including .pyc).\n --config Load configuration from `file` instead of trying to\n locate one of the implicit configuration files.\n -c --clear Clear the screen before each run.\n -n --nobeep Do not beep on failure.\n -w --wait Waits for all tests to complete before re-running.\n Otherwise, tests are interrupted on filesystem events.\n --beforerun Run arbitrary command before tests are run.\n --afterrun Run arbitrary command on completion or interruption.\n The exit code of \"py.test\" is passed as an argument.\n --onpass Run arbitrary command on pass.\n --onfail Run arbitrary command on failure.\n --onexit Run arbitrary command when exiting pytest-watch.\n --runner Run a custom command instead of \"py.test\".\n --pdb Start the interactive Python debugger on errors.\n This also enables --wait to prevent pdb interruption.\n --spool Re-run after a delay (in milliseconds), allowing for\n more file system events to queue up (default: 200 ms).\n -p --poll Use polling instead of OS events (useful in VMs).\n -v --verbose Increase verbosity of the output.\n -q --quiet Decrease verbosity of the output (precedence over -v).\n -V --version Print version and exit.\n -h --help Print help and exit.\n\nConfiguration\n-------------\n\nCLI options can be added to a ``[pytest-watch]`` section in your\n`pytest.ini file `__ to\npersist them in your project. For example:\n\n.. code:: ini\n\n # pytest.ini\n\n [pytest]\n addopts = --maxfail=2\n\n\n [pytest-watch]\n ignore = ./integration-tests\n nobeep = True\n\nAlternatives\n------------\n\n- `xdist `__ offers the\n ``--looponfail`` (``-f``) option (and distributed testing options).\n This instead re-runs only those tests which have failed until you\n make them pass. This can be a speed advantage when trying to get all\n tests passing, but leaves out the discovery of new failures until\n then. It also drops the colors outputted by py.test, whereas\n pytest-watch doesn\u2019t.\n- `Nosey `__ is the original codebase\n this was forked from. Nosey runs\n `nose `__ instead of pytest.\n\nContributing\n------------\n\n1. Check the open issues or open a new issue to start a discussion\n around your feature idea or the bug you found\n2. Fork the repository, make your changes, and add yourself to\n `Authors.md <./AUTHORS.md>`__\n3. Send a pull request\n\nIf you want to edit the README, be sure to make your changes to\n``README.md`` and run the following to regenerate the ``README.rst``\nfile:\n\n.. code:: bash\n\n $ pandoc -t rst -o README.rst README.md\n\nIf your PR has been waiting a while, feel free to `ping me on\nTwitter `__.\n\nUse this software often? :smiley:\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/joeyespo/pytest-watch", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pytest-watch", "package_url": "https://pypi.org/project/pytest-watch/", "platform": "any", "project_url": "https://pypi.org/project/pytest-watch/", "project_urls": { "Homepage": "http://github.com/joeyespo/pytest-watch" }, "release_url": "https://pypi.org/project/pytest-watch/4.2.0/", "requires_dist": null, "requires_python": "", "summary": "Local continuous test runner with pytest and watchdog.", "version": "4.2.0" }, "last_serial": 3881402, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "ad3477ccd2ec705bdd6803d23f136c77", "sha256": "54d4834049112e94eeeb9215aaa9e33151c801dc459d77602135374a01c842d2" }, "downloads": -1, "filename": "pytest-watch-0.1.0.zip", "has_sig": false, "md5_digest": "ad3477ccd2ec705bdd6803d23f136c77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8708, "upload_time": "2015-01-12T02:18:36", "url": "https://files.pythonhosted.org/packages/80/87/44ad074f6b07b22d6c1c99a999330b09b094f5a7353d503a9b16b7613418/pytest-watch-0.1.0.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "e9655f4d2ea20ad9fc83c37b43b25610", "sha256": "4dc4ab209659ae71d69775fd87794a17f11d0adece467a1da76b3cda8fabf59d" }, "downloads": -1, "filename": "pytest-watch-0.1.1.zip", "has_sig": false, "md5_digest": "e9655f4d2ea20ad9fc83c37b43b25610", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9110, "upload_time": "2015-01-17T07:04:56", "url": "https://files.pythonhosted.org/packages/11/d7/d8280e40060f0898c4fe9d1fac2067aa4d38170379fc781337214285a60f/pytest-watch-0.1.1.zip" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "f7469f041e7470d6d0c8fe807cd75281", "sha256": "422cb0714d1164e6b2642716be7e441209c115f1934cfe203e6732e531e8549d" }, "downloads": -1, "filename": "pytest-watch-1.0.0.zip", "has_sig": false, "md5_digest": "f7469f041e7470d6d0c8fe807cd75281", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10936, "upload_time": "2015-02-06T05:34:16", "url": "https://files.pythonhosted.org/packages/fd/49/8734417278874037c2d8041800fc089e0a94172c01de1a9f5b6cc31d260c/pytest-watch-1.0.0.zip" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "8e8b55ed9f500d138d6ff776f4ec13ba", "sha256": "91deecccdddd22ad5f756b1206ffea972ecb7ff55a8f7a4b8c84745d4ebec09b" }, "downloads": -1, "filename": "pytest-watch-2.0.0.zip", "has_sig": false, "md5_digest": "8e8b55ed9f500d138d6ff776f4ec13ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11427, "upload_time": "2015-02-07T04:20:17", "url": "https://files.pythonhosted.org/packages/97/7e/3c1dd76e83cfde95e8f4804c2788989b1a084792e091e76673bf2484191a/pytest-watch-2.0.0.zip" } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "3f0a8c613e04967d9942e067479ee419", "sha256": "4bb26f32e4f0ccb38c694a01932d08b2303a6c426d476b0306763bcce86e635e" }, "downloads": -1, "filename": "pytest-watch-3.0.0.zip", "has_sig": false, "md5_digest": "3f0a8c613e04967d9942e067479ee419", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13874, "upload_time": "2015-06-14T17:01:08", "url": "https://files.pythonhosted.org/packages/35/a0/80b06164ac7719e20f7379c08e027bd55f128243682c3711ca369e8af1cf/pytest-watch-3.0.0.zip" } ], "3.1.0": [ { "comment_text": "", "digests": { "md5": "237c2557f672463d9a623240cddac880", "sha256": "461caec48a51c2808bc69e42b55799cf7097a5c4ca6f9b652a4a8160b7e060eb" }, "downloads": -1, "filename": "pytest-watch-3.1.0.zip", "has_sig": false, "md5_digest": "237c2557f672463d9a623240cddac880", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14390, "upload_time": "2015-06-21T03:46:40", "url": "https://files.pythonhosted.org/packages/4d/d3/70fbc6ec97845852a1a0ef649440e69d499c4719e3cb7f1e85ea6400832c/pytest-watch-3.1.0.zip" } ], "3.10.0": [ { "comment_text": "", "digests": { "md5": "dace30dadfca90b85ec18f0b1bd6628d", "sha256": "3194c280a4252217021000554273ff9b2d074138ccbc5d15fec2f2c0ce0b8cb1" }, "downloads": -1, "filename": "pytest-watch-3.10.0.zip", "has_sig": false, "md5_digest": "dace30dadfca90b85ec18f0b1bd6628d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16878, "upload_time": "2016-02-12T06:01:03", "url": "https://files.pythonhosted.org/packages/0a/81/ef4f17f8600eea92828b823fb989f660b46d38c3b22d02ee02c3201affcc/pytest-watch-3.10.0.zip" } ], "3.2.0": [ { "comment_text": "", "digests": { "md5": "66851494d4cd0d295e884c388fc70a49", "sha256": "aa0c7dc730c4220a86e50e5d603152498a53fca5400f811871d4c6085c788c79" }, "downloads": -1, "filename": "pytest-watch-3.2.0.zip", "has_sig": false, "md5_digest": "66851494d4cd0d295e884c388fc70a49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14351, "upload_time": "2015-06-28T20:10:58", "url": "https://files.pythonhosted.org/packages/96/d4/1046c9fe068b77fc43b0a6c1bc35ea1e0419660fe785eb8b2bf438a8d5a4/pytest-watch-3.2.0.zip" } ], "3.3.0": [ { "comment_text": "", "digests": { "md5": "a677505581b6862b4b57f2c8e66b1237", "sha256": "ca2cdf64812d49049b9d6d4c41d630c3bcbd2b8ea1e81137630134791e3de0fa" }, "downloads": -1, "filename": "pytest-watch-3.3.0.zip", "has_sig": false, "md5_digest": "a677505581b6862b4b57f2c8e66b1237", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14601, "upload_time": "2015-09-16T05:08:22", "url": "https://files.pythonhosted.org/packages/40/ab/1d4a8aab8440e9c614581b2aa081d366c0e7015d1025bc5212b14096884a/pytest-watch-3.3.0.zip" } ], "3.5.0": [ { "comment_text": "", "digests": { "md5": "ee287ccb419781ba05cc4570bb4570ce", "sha256": "345b488a567115623f77b60e4eabfb0b0564435786f1ec8b72d59ee49d391b9f" }, "downloads": -1, "filename": "pytest-watch-3.5.0.zip", "has_sig": false, "md5_digest": "ee287ccb419781ba05cc4570bb4570ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14679, "upload_time": "2015-09-19T06:26:52", "url": "https://files.pythonhosted.org/packages/0f/b2/f520394683f61b3483693bd0f0902887241824970a4177e50e76fa893042/pytest-watch-3.5.0.zip" } ], "3.6.0": [ { "comment_text": "", "digests": { "md5": "6f39f15a8daee3b5d43c772bc05f3eec", "sha256": "06fc30f3b7f0e86a48abc5efc18313d6153d7439719fbb5d2e3aefc62574d07e" }, "downloads": -1, "filename": "pytest-watch-3.6.0.zip", "has_sig": false, "md5_digest": "6f39f15a8daee3b5d43c772bc05f3eec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14809, "upload_time": "2015-11-30T01:29:02", "url": "https://files.pythonhosted.org/packages/72/93/917bbf74034476ea7d92a00fcac1b0d1f91f70ea3afda1768cd5121c5405/pytest-watch-3.6.0.zip" } ], "3.7.0": [ { "comment_text": "", "digests": { "md5": "da38a5912e113e8983bd9339380f43d3", "sha256": "1ba0c8b637bd9518886328d3a77f7a8406119557657b2ce18a31adfb2fc97256" }, "downloads": -1, "filename": "pytest-watch-3.7.0.zip", "has_sig": false, "md5_digest": "da38a5912e113e8983bd9339380f43d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14919, "upload_time": "2015-12-02T06:24:37", "url": "https://files.pythonhosted.org/packages/ad/74/0247b130820691613ccd21d333e6e339c2672e313ff9befa8fb6f73d3bd4/pytest-watch-3.7.0.zip" } ], "3.8.0": [ { "comment_text": "", "digests": { "md5": "6298b5794d6f17b1020be2434e4b4712", "sha256": "e0c1e1e3b8d1134eb7297f722074846557468e85b3228c9583162271366e8792" }, "downloads": -1, "filename": "pytest-watch-3.8.0.zip", "has_sig": false, "md5_digest": "6298b5794d6f17b1020be2434e4b4712", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16504, "upload_time": "2015-12-04T18:48:24", "url": "https://files.pythonhosted.org/packages/bb/00/5c2850fe3addfa2aacfdd226768caf1cbb6892e5ac561753235574c36df3/pytest-watch-3.8.0.zip" } ], "3.9.0": [], "4.0.0": [ { "comment_text": "", "digests": { "md5": "4e8ec38f1eab211d09afd9c623421000", "sha256": "5cb9d1220e5ad05f00a7c482710f92f1072a8119b2909ffc33f4fdf84531c212" }, "downloads": -1, "filename": "pytest-watch-4.0.0.zip", "has_sig": false, "md5_digest": "4e8ec38f1eab211d09afd9c623421000", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20395, "upload_time": "2016-04-06T05:50:50", "url": "https://files.pythonhosted.org/packages/0d/ab/07d2aa3bdd67fcade314ea92472f51077a4b8bacbefe0aef868c2469686f/pytest-watch-4.0.0.zip" } ], "4.1.0": [ { "comment_text": "", "digests": { "md5": "4048e6e4a420ee54ed1318c71153e593", "sha256": "29941f6ff74e6d85cc0796434a5cbc27ebe51e91ed24fd0757fad5cc6fd3d491" }, "downloads": -1, "filename": "pytest-watch-4.1.0.zip", "has_sig": false, "md5_digest": "4048e6e4a420ee54ed1318c71153e593", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20925, "upload_time": "2016-04-08T20:26:45", "url": "https://files.pythonhosted.org/packages/e9/88/69b94fe4cb3d3b106b184056bc80ade6b0a9062e5a9a1cb65aec58831281/pytest-watch-4.1.0.zip" } ], "4.2.0": [ { "comment_text": "", "digests": { "md5": "9f854cdf60212c5d1a210c8991619ba4", "sha256": "06136f03d5b361718b8d0d234042f7b2f203910d8568f63df2f866b547b3d4b9" }, "downloads": -1, "filename": "pytest-watch-4.2.0.tar.gz", "has_sig": false, "md5_digest": "9f854cdf60212c5d1a210c8991619ba4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16340, "upload_time": "2018-05-20T19:52:16", "url": "https://files.pythonhosted.org/packages/36/47/ab65fc1d682befc318c439940f81a0de1026048479f732e84fe714cd69c0/pytest-watch-4.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9f854cdf60212c5d1a210c8991619ba4", "sha256": "06136f03d5b361718b8d0d234042f7b2f203910d8568f63df2f866b547b3d4b9" }, "downloads": -1, "filename": "pytest-watch-4.2.0.tar.gz", "has_sig": false, "md5_digest": "9f854cdf60212c5d1a210c8991619ba4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16340, "upload_time": "2018-05-20T19:52:16", "url": "https://files.pythonhosted.org/packages/36/47/ab65fc1d682befc318c439940f81a0de1026048479f732e84fe714cd69c0/pytest-watch-4.2.0.tar.gz" } ] }