You can learn more about it in this issue
The fix that worked for me was using the comment
bazelbuild/rules_python#330 (comment)
Prevent creation of empty init.py
See: bazelbuild/bazel#10076, bazelbuild/bazel#7386
build --incompatible_default_to_explicit_init_py test --incompatible_default_to_explicit_init_py