FAQ
The _test.go files for "testing" are technically in the same package being
tested.
But practically, they seem to belong more to a "main" package. When you
write test functions, you expect that all initialization of the package
being tested has been done.
It can be surprising if it is not the case. The intra package dependency is
that _test.go files depends on the other files, not the converse.

So, would it be reasonable to fill an issue to force init() in _test.go
files run last ?


--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 8 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedAug 16, '15 at 7:25p
activeAug 17, '15 at 1:20a
posts8
users4
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase