1# Best Practices 2 3Here we collection tips and techniques for keeping your tests maintainable and 4avoiding common pitfalls. 5 6### Put each suite of tests in its own sub-package 7 8It's recommended to put a given suite of unit tests in their own sub-package 9(directory with a BUILD file). This is because the names of your test functions 10become target names in the BUILD file, which makes it easier to create name 11conflicts. By moving them into their own package, you don't have to worry about 12unit test function names in one `.bzl` file conflicting with names in another. 13 14### Give test functions private names 15 16It's recommended to give test functions private names, i.e. start with a leading 17underscore. This is because if you forget to add a test to the list of tests (an 18easy mistake to make in a file with many tests), the test won't run, and it'll 19appear as if everything is OK. By using a leading underscore, tools like 20buildifier can detect the unused private function and will warn you that it's 21unused, preventing you from accidentally forgetting it. 22