EastAgile / robber.py

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

[f] Exception matcher #2

Closed hieueastagile closed 7 years ago

hieueastagile commented 7 years ago

Description

expect(lambda: raised_exception(something)).to.throw(something)
expect(callable).to.throw(something)

Note

func.when.called_with(args).should.raises(exception)

or expect syntax:

expect(func).when.called_with(args).to.raises(exception)
coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.02%) to 99.653% when pulling 5b28291763e035452f94ab1bfcadaabbf1e745d8 on feature/expect-with-exception into 69ecfc4301fa07d8a19cfbfa1670c28ca2e5f1dd on master.

tinhnguyen-ea commented 7 years ago

LGTM

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.03%) to 99.654% when pulling 467af043d0b124fdc7b3b7a9bc4787de92118a75 on feature/expect-with-exception into 69ecfc4301fa07d8a19cfbfa1670c28ca2e5f1dd on master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.03%) to 99.654% when pulling 9f70f52e097538096249bb440b1d412cb1d4cf9b on feature/expect-with-exception into 69ecfc4301fa07d8a19cfbfa1670c28ca2e5f1dd on master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.03%) to 99.654% when pulling 43e4cf4a418d8473bf6099e8077b6a3ee4038179 on feature/expect-with-exception into 69ecfc4301fa07d8a19cfbfa1670c28ca2e5f1dd on master.

tklarryonline commented 7 years ago

Hmm, could we make it 100% test coverage?

hieueastagile commented 7 years ago

@tklarryonline I'm going to add 100% test coverage as an issue after anh Quang grant me the permission for creating the issues, it's an easy task for encouraging any other python members to contribute to this project ^^, I don't want to contribute it alone :P.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.03%) to 99.656% when pulling bd5b252ce875f7a879579cfb1edc20b39fe2d83f on feature/expect-with-exception into 69ecfc4301fa07d8a19cfbfa1670c28ca2e5f1dd on master.

hieueastagile commented 7 years ago

@tklarryonline @oyster I resolved all the reviews already and I guess it's good for merging now, please check it the last time and let me know if all things are good there. Thanks.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.03%) to 99.656% when pulling c1c38ef8543364c311e17f49930c1af03b388264 on feature/expect-with-exception into 69ecfc4301fa07d8a19cfbfa1670c28ca2e5f1dd on master.