Skip to main content

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):

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):

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/

Release files for flowp 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flowp 1.2.1
File Size Uploaded
flowp-1.2.1.tar.gz 9.3 kB Details

Release files / flowp-1.2.1.tar.gz

Download URL flowp-1.2.1.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8f558b16cf239f5f7f8a96bd390b0021332a2b444888063282294f52b7e533bf
BLAKE2b-256 checksum
How to use checksums
803ee67dd6c386bd80e6828bd251c84abe4853e80dabc864abb67be941eb63fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.2.1 This release

1 release file

1.2.0

1 release file

1.1.1

1 release file

1.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page