EastAgile / robber.py

BDD / TDD assertion library for Python
MIT License
8 stars 1 forks source link

[r] Better must_fail #55

Closed catriuspham closed 7 years ago

catriuspham commented 7 years ago

Related issue

https://github.com/EastAgile/robber.py/issues/53

Description

Now, a must_fail test only passes if all of the expectations inside of it pass

Usage

This fails:

@must_fail
def test_eq_failure(self):
    expect(1).to.eq(2)
    expect(1).to.eq(1)

This passes:

@must_fail
def test_eq_failure(self):
    expect(1).to.eq(2)
    expect(1).to.eq(3)

Other changes

catriuspham commented 7 years ago

@nhanho You helped a lot with the logic of this PR. Thanks.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling ae855bd4ba0da5667e6ba43b59d457e62e4c0d99 on chore/better-must-fail into 85ce13ae06cc6f8c908bcd58fd71b928d2249176 on master.

catriuspham commented 7 years ago

@hieueastagile Please take a look

hieueastagile commented 7 years ago

LGTM @catriuspham

catriuspham commented 7 years ago

@oyster Please merge this PR and close this issue https://github.com/EastAgile/robber.py/issues/53