Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup and TearDown methods don't have access to testing object #1

Open
freeekanayaka opened this issue May 25, 2017 · 1 comment
Open

Comments

@freeekanayaka
Copy link

Hi,

I like the simplicity of this package and the fact that it stays close to the standard library.

However, is there any reason for not passing the testing object to the setup/teardown methods? E.g.:

type TestSuite interface {
	SetUpSuite(t *testing.T)
	TearDownSuite(t *testing.T)
	SetUp(t *testing.T)
	TearDown(t *testing.T)
}

Otherwise a I don't see a way for a test setup to fail cleanly (think integration tests which for example try to connect to a database during setup).

Alternatively, or even additionally, the above methods could return an error, and gosuite.Run would fail the test if not nil.

Thanks

@colthreepv
Copy link

I second to this, setup and teardown should be able to fail as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants