easyerrors-1.0.0
توضیحات
a simple module for testing out functions and catching its errors
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | easyerrors-1.0.0 |
| نام | easyerrors |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Sjoerd Vermeulen |
| ایمیل نویسنده | sjoerd@marsenaar.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/easyerrors/ |
| مجوز | - |
This module allows you to easily test simple functions. All errors will be catched and showed to you gracefully.
Note that this module is incredibly basic and does not work with any kind of indented code, so e.g. for loops are not an option.
code examples:
```
>>> from easyerrors import test
>>>
>>> @test
>>> def tryout(msg, num):
... print(msg, num)
...
>>> tryout('hey', 3)
Testing code inside function 'tryout':
-------- Test started! --------
>>> print(msg, num,)
hey 3
-------- Test ended! --------
```
```
>>> from easyerrors import test
>>>
>>> @test
>>> def tryout(msg, num):
... print(msg, num)
... print(invalidargument)
...
>>> tryout('hey', 3)
Testing code inside function 'tryout':
-------- Test started! --------
>>> print(msg, num)
hey 3
>>> print(incorrectargument)
Error: name 'incorrectargument' is not defined
-------- Test ended! --------
Errors found:
- name 'incorrectargument' is not defined
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl easyerrors-1.0.0:
pip install easyerrors-1.0.0.whl
نصب پکیج tar.gz easyerrors-1.0.0:
pip install easyerrors-1.0.0.tar.gz