From 4c015b30d5d88211bee1a26cfc8b548481f381df Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Tue, 5 Sep 2023 15:19:13 +0300 Subject: [PATCH] neotest: improve doc based on #3120 We don't want anyone to have the same problem. Signed-off-by: Roman Khimov --- pkg/neotest/doc.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/neotest/doc.go b/pkg/neotest/doc.go index d2546172b..bd223ae56 100644 --- a/pkg/neotest/doc.go +++ b/pkg/neotest/doc.go @@ -15,5 +15,11 @@ Usually it's used like this: Higher-order methods provided in Executor and ContractInvoker hide the details of transaction creation for the most part, but there are lower-level methods as well that can be used for specific tasks. + +It's recommended to have a separate folder/package for tests, because having +them in the same package with the smart contract iself can lead to unxpected +results if smart contract has any init() functions. If that's the case they +will be compiled into the testing binary even when using package_test and their +execution can affect tests. See https://github.com/nspcc-dev/neo-go/issues/3120 for details. */ package neotest