You can learn more about it in this issue
bazel-contrib/rules_python#330
The fix that worked for me was using the comment
bazel-contrib/rules_python#330 (comment)
build --incompatible_default_to_explicit_init_py test --incompatible_default_to_explicit_init_py