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

Teardown files for test_dir #158

Closed
wants to merge 1 commit into from
Closed

Teardown files for test_dir #158

wants to merge 1 commit into from

Conversation

gaborcsardi
Copy link
Member

As per #157. If you think this can make it, then I'll add a test case as well.

@hadley
Copy link
Member

hadley commented Sep 17, 2014

Let's discuss this a bit more - the granularity here seems wrong, because I think you'd want to run the teardown after each file, not after everything.

@hadley hadley closed this Sep 17, 2014
@gaborcsardi
Copy link
Member Author

As for the granularity, I think it is right. I understand that you may want a teardown for each file, but you can already do that, see my example at #157, and as it turns out on.exit works as well.

On the other hand, if you want a teardown for all tests in a directory, then there is really no good way to do that. I think this also has legitimate use cases, see e.g. the DB example in #157.

Furthermore, this way teardown functions are symmetric to helper functions. I think it would be unintuitive to have helper run for the directory and teardown for each file. This is if we think of helpers and teardowns as processes operating on the same level.

@hadley
Copy link
Member

hadley commented Sep 17, 2014

Helper really doesn't seem symmetric to tear down to me. Let's keep thinking about this - I need to get a new release out v soon to fix some r devel problems, but I think this is too big to go in this version.

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

Successfully merging this pull request may close these issues.

2 participants