stretchr / testify

A toolkit with common assertions and mocks that plays nicely with the standard library
MIT License
22.92k stars 1.58k forks source link

Asserts / catch os.Exit(1) #813

Open genofire opened 4 years ago

genofire commented 4 years ago

It would be nice, that testify could handle os.Exit(1) like panic("blub") with https://godoc.org/github.com/stretchr/testify/assert#Assertions.Panics

boyan-soubachov commented 4 years ago

This would most likely involve spawning a separate go test process and then catching its output in specific cases. I'm not sure the added complexity would be worth it but I'd be happy to look at any implementation proposals should there be enough demand by the community :)