Skip to content

Commit

Permalink
fix(gazelle): Reproduce issue generating py_test rules with no test…
Browse files Browse the repository at this point in the history
… files in project mode
  • Loading branch information
amartani committed Mar 20, 2024
1 parent e86252f commit fb673ee
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gazelle/python/testdata/project_generation_mode/BUILD.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# gazelle:python_extension enabled
# gazelle:python_generation_mode project
15 changes: 15 additions & 0 deletions gazelle/python/testdata/project_generation_mode/BUILD.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
load("@rules_python//python:defs.bzl", "py_library", "py_test")

# gazelle:python_extension enabled
# gazelle:python_generation_mode project

py_library(
name = "project_generation_mode",
srcs = ["__init__.py"],
visibility = ["//:__subpackages__"],
)

py_test(
name = "project_generation_mode_test",
main = "__test__.py",
)
1 change: 1 addition & 0 deletions gazelle/python/testdata/project_generation_mode/WORKSPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# This is a Bazel workspace for the Gazelle test data.
Empty file.
15 changes: 15 additions & 0 deletions gazelle/python/testdata/project_generation_mode/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2023 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---

0 comments on commit fb673ee

Please sign in to comment.