I found a huge bug today and thought of Pants. We...
# random
b
I found a huge bug today and thought of Pants. We use Bazel's
rules_python
which has
py_test
to run your
unittest
test suite. We wrap it in our own sauce to add
pytest
and re-export a
py_test
macro. Turns out a few
BUILD
files used the
rules_python
py_test
macro -> their
pytest
-style tests ran with
unittest
->
unittest
doesn't see any tests, and doesn't error when no tests are run -> tests were never really run. My only reaction was:
This would've never happened with Pants
👀 1
😮 1
@busy-vase-39202 you like quotables 😁
h
This would've never happened with Pants
Is there a particular reason you think that? An obvious answer is we use Pytest rather than unittest
b
Precisely! Bazel has yet to be taught about the python test runner ubiquitous in the Python ecosystem. And I doubt it'll ever support it well enough for
conftest.py
files