Conversation
| def setUpClass(cls): | ||
| """TODO: Define set up before the test suite""" | ||
| super().setUpClass() | ||
| cls.run_command("bazel clean") |
There was a problem hiding this comment.
Can you remember what was the rationale here when we added it?
There was a problem hiding this comment.
Yes, it was "this is in the legacy test, lets keep it".
A bit more indepth reason would be that since this rule is not (yet) hermetic, it should be cleaned between runs.
I argue against this, if tests are run on the same machine their output will be the same and unittests can only be run on a single machine.
| return_code, stdout, stderr = self.run_command("bazel build //src:*") | ||
| self.assertEqual(0, return_code, stderr) |
There was a problem hiding this comment.
What is the rationale behind this one?
There was a problem hiding this comment.
Since all test using this template will most certainly call a bazel build/test command, it makes sense to provide an example for it. The target was chosen for its minimal runtime.
There was a problem hiding this comment.
Since all test using this template will most certainly call a bazel build/test command, it makes sense to provide an example for it. The target was chosen for its minimal runtime.
Why:
We want to provide a template in top shape to give a solid foundation for new tests.
What:
bazel cleanfrom setup class.Addresses:
#153