Skip to content

Commit

Permalink
Set version to 4.2.0
Browse files Browse the repository at this point in the history
See CHANGES.md for details.
  • Loading branch information
joeyespo committed May 20, 2018
1 parent a84ef68 commit 2ec7d59
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 65 deletions.
5 changes: 5 additions & 0 deletions AUTHORS.md
Expand Up @@ -12,6 +12,11 @@ along with the following contributors:
- Colton J. Provias ([@ColtonProvias](https://github.com/ColtonProvias))
- Abhas Bhattacharya ([@bendtherules](https://github.com/bendtherules))
- Lukasz Balcerzak ([@lukaszb](https://github.com/lukaszb))
- Remco Haszing ([@remcohaszing](https://github.com/remcohaszing))
- Stefan Reichoer ([@xsteve](https://github.com/xsteve))
- Jace Browning ([@jacebrowning](https://github.com/jacebrowning))
- Emmanuel Leblond ([@touilleMan](https://github.com/touilleMan))
- Alex Ford ([@asford](https://github.com/asford))
- And Past ([@apast](https://github.com/apast))

[home]: README.md
20 changes: 18 additions & 2 deletions CHANGES.md
Expand Up @@ -2,10 +2,21 @@ pytest-watch Changelog
======================


Version 4.2.0 (dev)
-------------------
Version 4.2.0 (2018-05-20)
--------------------------

- Enhancement: Show timestamp before running py.test ([#66](https://github.com/joeyespo/pytest-watch/pull/66) - thanks, [@xsteve][]!)
- Enhancement: Add watch single file feature ([#80](https://github.com/joeyespo/pytest-watch/pull/80) - thanks, [@touilleMan][]!)
- Bugfix: Add more common cache directories to `.gitignore`
- Bugfix: Handle SystemExit also when calling _run_pytest_collect ([#60](https://github.com/joeyespo/pytest-watch/pull/60) - thanks, [@blueyed][]!)
- Bugfix: Wait for pdb if it's passed to `pytest_args` ([#64](https://github.com/joeyespo/pytest-watch/pull/64) - thanks, [@remcohaszing][]!)
- Bugfix: Use the same Python interpreter for `pytest` when `ptw` is run outside of an activated virtual environment ([#72](https://github.com/joeyespo/pytest-watch/pull/72) - thanks, [@jacebrowning][]!)
- Bugfix: Fix `TypeError: can only concatenate tuple (not "list") to tuple`
- Bugfix: Show output when pytest is interrupted on config collection (dac01e9e585176c1da55b5588bdf86c8dd016c22) and document pytest exit code ([#90](https://github.com/joeyespo/pytest-watch/pull/90) - thanks, [@asford][]!)
- Readme: Add full command-line usage
- Readme: Add `README.rst` for better-looking README on PyPI ([#83](https://github.com/joeyespo/pytest-watch/pull/83) - thanks, [@apast][]!)
- Readme: Remove Gratipay :frowning_face: ([Article](https://gratipay.news/the-end-cbfba8f50981))
- Readme: Add [Say Thanks](http://saythanks.io/) badge :smiley:


Version 4.1.0 (2016-04-08)
Expand Down Expand Up @@ -151,4 +162,9 @@ First public preview release.
[@ColtonProvias]: https://github.com/ColtonProvias
[@bendtherules]: https://github.com/bendtherules
[@lukaszb]: https://github.com/lukaszb
[@remcohaszing]: https://github.com/remcohaszing
[@xsteve]: https://github.com/xsteve
[@jacebrowning]: https://github.com/jacebrowning
[@touilleMan]: https://github.com/touilleMan
[@asford]: https://github.com/asford
[@apast]: https://github.com/apast
123 changes: 63 additions & 60 deletions README.rst
@@ -1,7 +1,8 @@
pytest-watch – Continuous pytest runner
=======================================

|Current version on PyPI| |Downloads/month on PyPI|
`Current version on PyPI <http://pypi.python.org/pypi/pytest-watch/>`__
`Say Thanks! <https://saythanks.io/to/joeyespo>`__

**pytest-watch** a zero-config CLI tool that runs
`pytest <http://pytest.org/>`__, and re-runs it when a file in your
Expand All @@ -24,16 +25,16 @@ Installation

.. code:: bash
$ pip install pytest-watch
$ pip install pytest-watch
Usage
-----

.. code:: bash
$ cd myproject
$ ptw
* Watching /path/to/myproject
$ cd myproject
$ ptw
* Watching /path/to/myproject
*Note: It can also be run using its full name ``pytest-watch``.*

Expand All @@ -47,16 +48,16 @@ when tests pass or fail:

.. code:: bash
$ ptw --onpass "growlnotify -m \"All tests passed!\"" \
--onfail "growlnotify -m \"Tests failed\""
$ ptw --onpass "growlnotify -m \"All tests passed!\"" \
--onfail "growlnotify -m \"Tests failed\""
using `GrowlNotify <http://growl.info/downloads#generaldownloads>`__.

- **Windows**

.. code:: bat
> ptw --onfail flash
> ptw --onfail flash
using `Console Flash <http://github.com/joeyespo/console-flash>`__

Expand All @@ -65,74 +66,74 @@ database:

.. code:: bash
$ ptw --beforerun init_db.py
$ ptw --beforerun init_db.py
Or after they finish, e.g. deleting a sqlite file. Note that this script
receives the exit code of ``py.test`` as an argument.

.. code:: bash
$ ptw --afterrun cleanup_db.py
$ ptw --afterrun cleanup_db.py
You can also use a custom runner script for full ``py.test`` control:

.. code:: bash
$ ptw --runner "python custom_pytest_runner.py"
$ ptw --runner "python custom_pytest_runner.py"
Here’s an minimal runner script that runs ``py.test`` and prints its
exit code:

.. code:: py
# custom_pytest_runner.py
# custom_pytest_runner.py
import sys
import pytest
import sys
import pytest
print('py.test exited with code:', pytest.main(sys.argv[1:]))
print('py.test exited with code:', pytest.main(sys.argv[1:]))
Need to exclude directories from being observed or collected for tests?

.. code:: bash
$ ptw --ignore ./deep-directory --ignore ./integration_tests
$ ptw --ignore ./deep-directory --ignore ./integration_tests
See the full list of options:

::

$ ptw --help
Usage: ptw [options] [--ignore <dir>...] [<directory>...] [-- <pytest-args>...]

Options:
--ignore <dir> Ignore directory from being watched and during
collection (multi-allowed).
--ext <exts> Comma-separated list of file extensions that can
trigger a new test run when changed (default: .py).
Use --ext=* to allow any file (including .pyc).
--config <file> Load configuration from `file` instead of trying to
locate one of the implicit configuration files.
-c --clear Clear the screen before each run.
-n --nobeep Do not beep on failure.
-w --wait Waits for all tests to complete before re-running.
Otherwise, tests are interrupted on filesystem events.
--beforerun <cmd> Run arbitrary command before tests are run.
--afterrun <cmd> Run arbitrary command on completion or interruption.
The exit code of "py.test" is passed as an argument.
--onpass <cmd> Run arbitrary command on pass.
--onfail <cmd> Run arbitrary command on failure.
--onexit <cmd> Run arbitrary command when exiting pytest-watch.
--runner <cmd> Run a custom command instead of "py.test".
--pdb Start the interactive Python debugger on errors.
This also enables --wait to prevent pdb interruption.
--spool <delay> Re-run after a delay (in milliseconds), allowing for
more file system events to queue up (default: 200 ms).
-p --poll Use polling instead of OS events (useful in VMs).
-v --verbose Increase verbosity of the output.
-q --quiet Decrease verbosity of the output (precedence over -v).
-V --version Print version and exit.
-h --help Print help and exit.
$ ptw --help
Usage: ptw [options] [--ignore <dir>...] [<directory>...] [-- <pytest-args>...]

Options:
--ignore <dir> Ignore directory from being watched and during
collection (multi-allowed).
--ext <exts> Comma-separated list of file extensions that can
trigger a new test run when changed (default: .py).
Use --ext=* to allow any file (including .pyc).
--config <file> Load configuration from `file` instead of trying to
locate one of the implicit configuration files.
-c --clear Clear the screen before each run.
-n --nobeep Do not beep on failure.
-w --wait Waits for all tests to complete before re-running.
Otherwise, tests are interrupted on filesystem events.
--beforerun <cmd> Run arbitrary command before tests are run.
--afterrun <cmd> Run arbitrary command on completion or interruption.
The exit code of "py.test" is passed as an argument.
--onpass <cmd> Run arbitrary command on pass.
--onfail <cmd> Run arbitrary command on failure.
--onexit <cmd> Run arbitrary command when exiting pytest-watch.
--runner <cmd> Run a custom command instead of "py.test".
--pdb Start the interactive Python debugger on errors.
This also enables --wait to prevent pdb interruption.
--spool <delay> Re-run after a delay (in milliseconds), allowing for
more file system events to queue up (default: 200 ms).
-p --poll Use polling instead of OS events (useful in VMs).
-v --verbose Increase verbosity of the output.
-q --quiet Decrease verbosity of the output (precedence over -v).
-V --version Print version and exit.
-h --help Print help and exit.

Configuration
-------------
Expand All @@ -143,15 +144,15 @@ persist them in your project. For example:

.. code:: ini
# pytest.ini
# pytest.ini
[pytest]
addopts = --maxfail=2
[pytest]
addopts = --maxfail=2
[pytest-watch]
ignore = ./integration-tests
nobeep = True
[pytest-watch]
ignore = ./integration-tests
nobeep = True
Alternatives
------------
Expand All @@ -176,13 +177,15 @@ Contributing
`Authors.md <./AUTHORS.md>`__
3. Send a pull request

If you want to edit the README, be sure to make your changes to
``README.md`` and run the following to regenerate the ``README.rst``
file:

.. code:: bash
$ pandoc -t rst -o README.rst README.md
If your PR has been waiting a while, feel free to `ping me on
Twitter <https://twitter.com/joeyespo>`__.

Use this software often? Please consider `supporting
pytest-watch <https://gratipay.com/pytest-watch/>`__.

.. |Current version on PyPI| image:: http://img.shields.io/pypi/v/pytest-watch.svg
:target: http://pypi.python.org/pypi/pytest-watch/
.. |Downloads/month on PyPI| image:: http://img.shields.io/pypi/dm/pytest-watch.svg
:target: http://pypi.python.org/pypi/pytest-watch/
Use this software often? :smiley:
2 changes: 1 addition & 1 deletion pytest_watch/__init__.py
Expand Up @@ -8,7 +8,7 @@
:license: MIT, see LICENSE for more details.
"""

__version__ = '4.1.0'
__version__ = '4.2.0'


from .command import main, doc, version
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -5,13 +5,13 @@

def read(filename):
filepath = os.path.join(os.path.dirname(__file__), filename)
with io.open(filepath, mode="r", encoding="utf-8") as f:
with io.open(filepath, mode='r', encoding='utf-8') as f:
return f.read()


setup(
name='pytest-watch',
version='4.1.0',
version='4.2.0',
description='Local continuous test runner with pytest and watchdog.',
long_description=read('README.rst'),
author='Joe Esposito',
Expand Down

0 comments on commit 2ec7d59

Please sign in to comment.