Skip to main content

Automatic test execution on file changes

Project description

Why

Because unit testing is even more fun

  • when you don’t have to switch out of your editor to get feedback from unit tests.

  • the shorter the feedback period is till you get feedback from your tests.

I’ve seen the usefullness toying with rubys autotest command, so I pestered Felix to build something like this, and after using it for about a two years, I finally got around to packaging it. :-)

In addition to that it’s brain dead simple, has no dependencies and is _really_ small.

Usage

% watching_testrunner --help
Usage: watching_testrunner [options] [--] command [arguments...]

Options:
  -h, --help            show this help message and exit
  -b BASEPATH, --basepath=BASEPATH
                        base path to watch for changes
  -p WATCH_WILDCARD, --pattern=WATCH_WILDCARD
                        glob-style pattern for file names to watch

Examples

$ watching_testrunner nosetests

This will run nosetests whenever any python file below the current directory changes

$ watching_testrunner -- nosetests $NOSETESTS_ARGUMENTS

Will run nosetests all the same, but will not try to parse any of the nosetests arguments.

$ watching_testrunner --basepath foo/bar --pattern="*" nosetests $NOSETESTS_ARGUMENTS

This will run nosetests whenever any file below ./foo/bar changes.

$ watching_testrunner --basepath path/to/js_tests --pattern="*.js" jasmine --console

This will run jasmine –console whenever any js file below ./path/to/js_tests changes (i.e. you can use the watching testrunner to get auto test execution using any tool for any language)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

watching_testrunner-1.2.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

watching_testrunner-1.2.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file watching_testrunner-1.2.0.tar.gz.

File metadata

  • Download URL: watching_testrunner-1.2.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for watching_testrunner-1.2.0.tar.gz
Algorithm Hash digest
SHA256 fbe7f59a88fd6bb42b6dd3e4ff322a42370a351ea36d2f2dab9d61cdbf9a0b13
MD5 2006112bf961e73c159f5713fd3c8002
BLAKE2b-256 9d2d44e1b2945415b306c1d9598d57114d418526e20abae8ef63fb6017c7e351

See more details on using hashes here.

File details

Details for the file watching_testrunner-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: watching_testrunner-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for watching_testrunner-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d57b523bc83f5c86e4bbe5a9e56c1c4f5668d54a97d113a2bdd4e45948bb4b1
MD5 363067279470ac0c5efa31b564a9cbe3
BLAKE2b-256 449bf0760f772343908cb5e095c6668e6343a5b785a2caa1d0bf45efe35ad726

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page