process-tests-3.0.0
توضیحات
Tools for testing processes.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | Unix |
| نام فایل | process-tests-3.0.0 |
| نام | process-tests |
| نسخه کتابخانه | 3.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Ionel Cristian Mărieș |
| ایمیل نویسنده | contact@ionelmc.ro |
| آدرس صفحه اصلی | https://github.com/ionelmc/python-process-tests |
| آدرس اینترنتی | https://pypi.org/project/process-tests/ |
| مجوز | BSD-2-Clause |
========
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.
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8 | Python |
نحوه نصب
نصب پکیج whl process-tests-3.0.0:
pip install process-tests-3.0.0.whl
نصب پکیج tar.gz process-tests-3.0.0:
pip install process-tests-3.0.0.tar.gz