assert-info-0.2.1
توضیحات
A tool for fixing bare assert statements
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | assert-info-0.2.1 |
| نام | assert-info |
| نسخه کتابخانه | 0.2.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Samuel Broster |
| ایمیل نویسنده | s.h.broster+gitlab@pm.me |
| آدرس صفحه اصلی | https://gitlab.com/broster/assert-info |
| آدرس اینترنتی | https://pypi.org/project/assert-info/ |
| مجوز | - |
***********
Assert Info
***********
Assert Info fixes up bare assert statements in your code so they include diagnostics when
they they're hit.
A problem that crops up when working in legacy code bases is the use of ``assert X == Y``,
when this fails you get minimal diagnostics.
Whilst `Pytest <https://docs.pytest.org/en/latest/>`_ solves this by playing with AST at run
time, inserting diagnostics on the fly, you can't just run all your code with `Pytest`.
The standard libraries `unittest <https://docs.python.org/3/library/unittest.html>`_ solves
this problem with helper functions that include extra diagnostics by default, for instance
``assertEqual``.
This package will inspect any file and replace assert statement which aren't accompanied
by a message with a `unittest` style assertion so that when it fails you get diagnostics!
To run the script:
.. code-block:: shell
pip install assert-info
assert-info -h
نیازمندی
| مقدار | نام |
|---|---|
| >=2.0.4,<3.0.0 | asttokens |
| >=0.6.2,<0.7.0 | docopt |
| >=1.14.0,<2.0.0 | six |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.* | Python |
نحوه نصب
نصب پکیج whl assert-info-0.2.1:
pip install assert-info-0.2.1.whl
نصب پکیج tar.gz assert-info-0.2.1:
pip install assert-info-0.2.1.tar.gz