If I define, two tests, each with its own TestMain method, go test errors: "multiple definitions found of TestMain".
I can understand and was expecting this behaviour actually, because, there should not be more than one TestMain in the same package. However, I don't know what to do now. Each test suite has its own needs. I need to create distinct TestMains to setup the tests, of course, without renaming my packages.
I could do that easily in other languages with setup methods like beforeEach, which is unique to a test class.
Do you have any suggestions?
Aucun commentaire:
Enregistrer un commentaire