nestorsalceda / mamba

The definitive testing tool for Python. Born under the banner of Behavior Driven Development (BDD).
http://nestorsalceda.github.io/mamba
MIT License
520 stars 64 forks source link

Return code is 1 when all pass? #84

Closed Mike-Mohong-Pan closed 6 years ago

Mike-Mohong-Pan commented 8 years ago

Here is the output of my jenkins project via mamba --format documentation --no-color:

XmlCompiler
  when called

XmlMerger
  when multiple fail xmls
  when multiple pass xmls
  when mixed pass and fail xmls

4 examples ran in 0.6710 seconds

C:\JenkinsWorkspace\XmlUtils_Build\>exit 1 
Build step 'Execute Windows batch command' marked build as failure
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Sending email to: xxx.xxx@xxx.com
Finished: FAILURE
nestorsalceda commented 6 years ago

Hey Mike!

When mamba finishes with all examples passed it returns 0. Otherwise it returns 1. Like POSIX standard.

https://github.com/nestorsalceda/mamba/blob/master/mamba/cli.py#L20