Skip to content
This repository was archived by the owner on Aug 26, 2021. It is now read-only.
This repository was archived by the owner on Aug 26, 2021. It is now read-only.

Add setup/teardown functions to the TestCollector #17

@Cobular

Description

@Cobular

This is an important part of most testing libraries, so we should find a way to do it too! I want to plan how we will do this for a bit first, then we can make the PR and start working on it.

https://github.com/JakeCover/distest/blob/76a278b987ec4abb3ae023774f251362fbe0dff8/distest/bot.py#L31-L47

I'm pretty sure we just need to add a call to the up/down functions that should be run every test here (these could be used to reset databases or otherwise clean the slate). We would also need functions that can be run at the start and end of the overall program, which could probably be accomplished by adding some logic here, before and after the testing for loop runs.

https://github.com/JakeCover/distest/blob/76a278b987ec4abb3ae023774f251362fbe0dff8/distest/bot.py#L66-L74

Does that seem reasonable? This week is really bad for me, I have an SAT this weekend, but I can work on this next week for sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions