Coder Social home page Coder Social logo

icodein / pytest-expecter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jacebrowning/pytest-expecter

0.0 2.0 0.0 309 KB

Better testing with expecter and pytest.

Home Page: https://pytest-expecter.readthedocs.io

License: Other

Makefile 10.50% Python 89.50%

pytest-expecter's Introduction

Overview

A pytest plugin based on garybernhardt/expecter to write expressive tests.

Build Status Coverage Status PyPI Version PyPI License

Quick Start

With this plugin you can write tests (optionally using pytest-describe) like this:

def describe_foobar():

    def it_can_pass(expect):
        expect(2 + 3) == 5

    def it_can_fail(expect):
        expect(2 + 3) == 6

and get output like this:

============================= FAILURES =============================
___________________ describe_foobar.it_can_fail ____________________

    def it_can_fail(expect):
>       expect(2 + 3) == 6
E       AssertionError: Expected 6 but got 5

test_foobar.py:7: AssertionError
================ 1 failed, 1 passed in 2.67 seconds ================

Installation

Install it directly into an activated virtual environment:

$ pip install pytest-expecter

or add it to your Poetry project:

$ poetry add pytest-expecter

pytest-expecter's People

Contributors

jacebrowning avatar garybernhardt avatar sigmavirus24 avatar jnrowe avatar oneacross avatar exogen avatar dependabot[bot] avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.