watching-testrunner


Namewatching-testrunner JSON
Version 1.2.2 PyPI version JSON
download
home_pagehttps://github.com/tony/watching-testrunner
SummaryAutomatic test execution on file changes
upload_time2024-02-15 13:26:01
maintainer
docs_urlNone
authorFelix Schwarz, Martin Häcker, Robert Buchholz
requires_python
license
keywords unit testing automation automatic test runner
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Why

Because unit testing is way more fun

- when you don't have to switch out of your editor to get feedback from unit tests.
- when the feedback period from a change to feedback from your tests is shorter.

I've seen the usefullness of a tool like this when toying with rubys
autotest command, but didn't like the complications of getting that
highly optimized code to work with setups like VMs and Docker Containers
where file system notifications don't reliably work.

So this skips all the optimizations and just uses the simplest possible
algorithm - iterate all files and see what changed. And that works
surprisingly well.

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

# Usage

```bash
% 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

```bash
$ watching_testrunner nosetests
```

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

```bash
$ watching_testrunner -- nosetests $NOSETESTS_ARGUMENTS
```

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

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

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

```bash
$ 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)

# Many thanks to
- [Felix Schwarz](https://github.com/FelixSchwarz) for the original implementation after me pestering him about this idea
- [Tony Narlock](https://github.com/tony) for prompting me to port this to python 3, hosting it on his account and caring for it's continued development

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tony/watching-testrunner",
    "name": "watching-testrunner",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "unit testing automation automatic test runner",
    "author": "Felix Schwarz, Martin H\u00e4cker, Robert Buchholz",
    "author_email": "felix.schwarz@web.de, spamfaenger@gmx.de, rbu@rbu.sh, tony@git-pull.com",
    "download_url": "https://files.pythonhosted.org/packages/55/6c/69aa0bf1ae51e284849049da62ff9cc2a8a9aa5bbe07e0ff8f220d52b440/watching_testrunner-1.2.2.tar.gz",
    "platform": null,
    "description": "# Why\n\nBecause unit testing is way more fun\n\n- when you don't have to switch out of your editor to get feedback from unit tests.\n- when the feedback period from a change to feedback from your tests is shorter.\n\nI've seen the usefullness of a tool like this when toying with rubys\nautotest command, but didn't like the complications of getting that\nhighly optimized code to work with setups like VMs and Docker Containers\nwhere file system notifications don't reliably work.\n\nSo this skips all the optimizations and just uses the simplest possible\nalgorithm - iterate all files and see what changed. And that works\nsurprisingly well.\n\nIn addition to that it's dead simple, has no dependencies and is\n_really_ small.\n\n# Usage\n\n```bash\n% watching_testrunner --help\nUsage: watching_testrunner [options] [--] command [arguments...]\n\nOptions:\n  -h, --help            show this help message and exit\n  -b BASEPATH, --basepath=BASEPATH\n                        base path to watch for changes\n  -p WATCH_WILDCARD, --pattern=WATCH_WILDCARD\n                        glob-style pattern for file names to watch\n```\n\n# Examples\n\n```bash\n$ watching_testrunner nosetests\n```\n\nThis will run nosetests whenever any python file below the current directory changes\n\n```bash\n$ watching_testrunner -- nosetests $NOSETESTS_ARGUMENTS\n```\n\nWill run nosetests all the same, but will not try to parse any of the nosetests arguments.\n\n```bash\n$ watching_testrunner --basepath foo/bar --pattern=\"*\" nosetests $NOSETESTS_ARGUMENTS\n```\n\nThis will run nosetests whenever any file below ./foo/bar changes.\n\n```bash\n$ watching_testrunner --basepath path/to/js_tests --pattern=\"*.js\" jasmine --console\n```\n\nThis will run jasmine --console whenever any js file below `./path/to/js_tests` changes (i.e. you\ncan use the watching testrunner to get auto test execution using any tool for any language)\n\n# Many thanks to\n- [Felix Schwarz](https://github.com/FelixSchwarz) for the original implementation after me pestering him about this idea\n- [Tony Narlock](https://github.com/tony) for prompting me to port this to python 3, hosting it on his account and caring for it's continued development\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Automatic test execution on file changes",
    "version": "1.2.2",
    "project_urls": {
        "Changes": "https://github.com/tony/watching-testrunner/blob/master/CHANGES",
        "Code": "https://github.com/tony/watching-testrunner",
        "Documentation": "https://github.com/tony/watching-testrunner",
        "Homepage": "https://github.com/tony/watching-testrunner",
        "Issue tracker": "https://github.com/tony/watching-testrunner/issues",
        "Q & A": "https://github.com/tony/watching-testrunner/discussions"
    },
    "split_keywords": [
        "unit",
        "testing",
        "automation",
        "automatic",
        "test",
        "runner"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "710d743ab6536312728c07f467f28c17d0e1f136a39dfdc477127f869af2f4ff",
                "md5": "24dacb2d78e7bb48225130c5da98da45",
                "sha256": "327838728513e2ecdd9154348a5683d4d2e6d5ed4fdd1472ee1016f8407adbb0"
            },
            "downloads": -1,
            "filename": "watching_testrunner-1.2.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "24dacb2d78e7bb48225130c5da98da45",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 4769,
            "upload_time": "2024-02-15T13:25:58",
            "upload_time_iso_8601": "2024-02-15T13:25:58.142893Z",
            "url": "https://files.pythonhosted.org/packages/71/0d/743ab6536312728c07f467f28c17d0e1f136a39dfdc477127f869af2f4ff/watching_testrunner-1.2.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "093925f6f83ddf2c8ea2a28bcb56db56538420b636385d4a8dc1c607e8c887ce",
                "md5": "a1dd3533136e38f73cd31e3b64ceef36",
                "sha256": "f061a0ab9f72297a40ef89a3fb970712838dfbc17116965e5293df0d47359d99"
            },
            "downloads": -1,
            "filename": "watching_testrunner-1.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a1dd3533136e38f73cd31e3b64ceef36",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4766,
            "upload_time": "2024-02-15T13:25:59",
            "upload_time_iso_8601": "2024-02-15T13:25:59.808200Z",
            "url": "https://files.pythonhosted.org/packages/09/39/25f6f83ddf2c8ea2a28bcb56db56538420b636385d4a8dc1c607e8c887ce/watching_testrunner-1.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "556c69aa0bf1ae51e284849049da62ff9cc2a8a9aa5bbe07e0ff8f220d52b440",
                "md5": "7bbbd29c179df7c436282f3ed002ead9",
                "sha256": "5677e007fdb1a5e7d20bcc8b80e06ba1ccd4062002cd1b03ee41169cf9859f77"
            },
            "downloads": -1,
            "filename": "watching_testrunner-1.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "7bbbd29c179df7c436282f3ed002ead9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4389,
            "upload_time": "2024-02-15T13:26:01",
            "upload_time_iso_8601": "2024-02-15T13:26:01.026798Z",
            "url": "https://files.pythonhosted.org/packages/55/6c/69aa0bf1ae51e284849049da62ff9cc2a8a9aa5bbe07e0ff8f220d52b440/watching_testrunner-1.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-15 13:26:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tony",
    "github_project": "watching-testrunner",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "watching-testrunner"
}
        
Elapsed time: 3.63373s