process-tests


Nameprocess-tests JSON
Version 3.0.0 PyPI version JSON
download
home_pagehttps://github.com/ionelmc/python-process-tests
SummaryTools for testing processes.
upload_time2023-11-01 17:40:48
maintainer
docs_urlNone
authorIonel Cristian Mărieș
requires_python>=3.8
licenseBSD-2-Clause
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            ========
Overview
========



Tools for testing processes.

* Free software: BSD 2-Clause License

Usage
=====

::

    from process_tests import ProcessTestCase
    from process_tests import TestProcess

    class MyTestCase(ProcessTestCase):
        def test_simple(self):
            with TestProcess('mydaemon', 'arg1', 'arg2') as proc:
                with self.dump_on_error(proc.read):
                    self.wait_for_strings(proc.read, 10, # wait 10 seconds for process to output lines with these strings
                        'Started',
                        'Working',
                        'Done',
                    )


Features
========

* TODO

Examples
========

* https://github.com/ionelmc/python-redis-lock/blob/master/tests/test_redis_lock.py
* https://github.com/ionelmc/python-manhole/blob/master/tests/test_manhole.py
* https://github.com/ionelmc/python-stampede/blob/master/tests/test_stampede.py
* https://github.com/ionelmc/python-remote-pdb/blob/master/tests/test_remote_pdb.py

TODO
====

* tests
* docs

Requirements
============

:OS: Any
:Runtime: Python 2.6, 2.7, 3.2, 3.3 or PyPy

Similar projects
================

* TODO


Changelog
=========

3.0.0 (2023-11-01)
------------------

* Dropped Python 2 support.
* Added an optional non-pipe TestProcess mode. You can use file objects for processes that are too verbose for a pipe.
* Added some tests.

2.1.2 (2021-05-02)
------------------

* Fixed another regression caused by the ``universal_newlines`` for Windows.

2.1.1 (2020-07-23)
------------------

* Fixed regression caused by the ``universal_newlines`` (now the internals don't decode strings).

2.1.0 (2020-07-23)
------------------

* Applied the cookiecutter-pylibrary templates.
* ``TestProcess`` will use ``universal_newlines`` by default for the contained ``subprocess.Popen`` to make sure line buffering is actually
  used. This also fixes warnings on Python 3.

2.x (???)
---------

* Lots of wild stuff.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ionelmc/python-process-tests",
    "name": "process-tests",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "Ionel Cristian M\u0103rie\u0219",
    "author_email": "contact@ionelmc.ro",
    "download_url": "https://files.pythonhosted.org/packages/23/61/f19c3474c8c87ebb13210e83391f156c971281773623f292fcab26b8c5be/process-tests-3.0.0.tar.gz",
    "platform": null,
    "description": "========\nOverview\n========\n\n\n\nTools for testing processes.\n\n* Free software: BSD 2-Clause License\n\nUsage\n=====\n\n::\n\n    from process_tests import ProcessTestCase\n    from process_tests import TestProcess\n\n    class MyTestCase(ProcessTestCase):\n        def test_simple(self):\n            with TestProcess('mydaemon', 'arg1', 'arg2') as proc:\n                with self.dump_on_error(proc.read):\n                    self.wait_for_strings(proc.read, 10, # wait 10 seconds for process to output lines with these strings\n                        'Started',\n                        'Working',\n                        'Done',\n                    )\n\n\nFeatures\n========\n\n* TODO\n\nExamples\n========\n\n* https://github.com/ionelmc/python-redis-lock/blob/master/tests/test_redis_lock.py\n* https://github.com/ionelmc/python-manhole/blob/master/tests/test_manhole.py\n* https://github.com/ionelmc/python-stampede/blob/master/tests/test_stampede.py\n* https://github.com/ionelmc/python-remote-pdb/blob/master/tests/test_remote_pdb.py\n\nTODO\n====\n\n* tests\n* docs\n\nRequirements\n============\n\n:OS: Any\n:Runtime: Python 2.6, 2.7, 3.2, 3.3 or PyPy\n\nSimilar projects\n================\n\n* TODO\n\n\nChangelog\n=========\n\n3.0.0 (2023-11-01)\n------------------\n\n* Dropped Python 2 support.\n* Added an optional non-pipe TestProcess mode. You can use file objects for processes that are too verbose for a pipe.\n* Added some tests.\n\n2.1.2 (2021-05-02)\n------------------\n\n* Fixed another regression caused by the ``universal_newlines`` for Windows.\n\n2.1.1 (2020-07-23)\n------------------\n\n* Fixed regression caused by the ``universal_newlines`` (now the internals don't decode strings).\n\n2.1.0 (2020-07-23)\n------------------\n\n* Applied the cookiecutter-pylibrary templates.\n* ``TestProcess`` will use ``universal_newlines`` by default for the contained ``subprocess.Popen`` to make sure line buffering is actually\n  used. This also fixes warnings on Python 3.\n\n2.x (???)\n---------\n\n* Lots of wild stuff.\n",
    "bugtrack_url": null,
    "license": "BSD-2-Clause",
    "summary": "Tools for testing processes.",
    "version": "3.0.0",
    "project_urls": {
        "Changelog": "https://github.com/ionelmc/python-process-tests/blob/master/CHANGELOG.rst",
        "Homepage": "https://github.com/ionelmc/python-process-tests",
        "Issue Tracker": "https://github.com/ionelmc/python-process-tests/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "54c02aa657428cfc22619d7fe7f6a34c7e3eb981ff6ce6e5c070f36db1e20293",
                "md5": "507e161685be5bc6d77b110b5cad2377",
                "sha256": "704aa9aad27cf9fdcc50212ae1518f7fed36faef5ddb4e0195ebeeb20306f47d"
            },
            "downloads": -1,
            "filename": "process_tests-3.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "507e161685be5bc6d77b110b5cad2377",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5595,
            "upload_time": "2023-11-01T17:40:47",
            "upload_time_iso_8601": "2023-11-01T17:40:47.116115Z",
            "url": "https://files.pythonhosted.org/packages/54/c0/2aa657428cfc22619d7fe7f6a34c7e3eb981ff6ce6e5c070f36db1e20293/process_tests-3.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2361f19c3474c8c87ebb13210e83391f156c971281773623f292fcab26b8c5be",
                "md5": "f982f20a7266c3dd7e92b92a684687ba",
                "sha256": "e5d57dea7161251e91cadb84bf3ecc85275fb121fd478e579f800777b1d424bd"
            },
            "downloads": -1,
            "filename": "process-tests-3.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f982f20a7266c3dd7e92b92a684687ba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 15165,
            "upload_time": "2023-11-01T17:40:48",
            "upload_time_iso_8601": "2023-11-01T17:40:48.561091Z",
            "url": "https://files.pythonhosted.org/packages/23/61/f19c3474c8c87ebb13210e83391f156c971281773623f292fcab26b8c5be/process-tests-3.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-01 17:40:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ionelmc",
    "github_project": "python-process-tests",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "process-tests"
}
        
Elapsed time: 0.15672s