Skip to main content

A rough-scaled python spec generator

Project description

Carinata is a command line tool which transforms spec files into unittest cases. It tries to be a bit like RSpec, but for python. It includes a management command for Django.

Spec files contain blocks called describe, context, before, after, let and it, which in turn contain pure python. Carinata uses these blocks to create a TestCase corresponding to each it block, with the setup from before and let and the teardown from after.

See the project homepage on GitHub for more information, but here is an example:

describe "My Awesome class":
    context "with the number 42":
        let "awesome": Awesome(42)

        it "jumps for joy":
            assert self.awesome.jumps_for_joy()

    context "with a string":
        let "awesome": Awesome('wow!')

        it "says it":
            assert self.awesome.say() == "Awesome says 'wow!'"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

carinata-0.12.1.tar.gz (8.0 kB view hashes)

Uploaded source

Built Distribution

carinata-0.12.1.linux-x86_64.tar.gz (16.5 kB view hashes)

Uploaded any

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page