flowp-1.2.1
توضیحات
More fun with Python development
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | flowp-1.2.1 |
| نام | flowp |
| نسخه کتابخانه | 1.2.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Pawel Galazka |
| ایمیل نویسنده | pawel.galazka@pracli.com |
| آدرس صفحه اصلی | http://pawelgalazka.github.io/flowp/ |
| آدرس اینترنتی | https://pypi.org/project/flowp/ |
| مجوز | BSD |
Flowp 1.2.1
===========
Flowp is a library which tries to bring the best ideas from Ruby / node.js
world to Python making development more fun. For version 1.2.1 module
flowp.testing is available which allows to write tests in a RSpec BDD
style with minimum of magic and flowp.files module which brings convenient utils
for files processing.
Installation
------------
::
$ pip3 install flowp
Quick start
-----------
Test subject (mymodule.py):
.. code-block:: python
class Calculator:
def __init__(self):
self.special_mode = False
def add(self, a, b):
sum = a + b
if self.special_mode:
sum += 1
return sum
Behavior specification (spec_mymodule.py):
.. code-block:: python
import mymodule
from flowp.testing import Behavior, expect
class Calculator(Behavior):
def before_each(self):
self.subject = mymodule.Calculator()
def it_add_numbers(self):
expect(self.subject.add(1, 2)) == 3
class WhenHaveSpecialMode(Behavior):
def before_each(self):
self.subject.special_mode = True
def it_add_additional_one(self):
expect(self.subject.add(1, 2)) == 4
To run::
$ python3 -m flowp.testing --watch
Giving --watch flag script will be watching on python files, if
some changes happen, tests will be rerun.
Documentation
---------------
http://pawelgalazka.github.io/flowp/
نحوه نصب
نصب پکیج whl flowp-1.2.1:
pip install flowp-1.2.1.whl
نصب پکیج tar.gz flowp-1.2.1:
pip install flowp-1.2.1.tar.gz