File tree Expand file tree Collapse file tree 9 files changed +99
-1
lines changed
Expand file tree Collapse file tree 9 files changed +99
-1
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ var pyKinds = map[string]rule.KindInfo{
6565 },
6666 },
6767 pyTestKind : {
68- MatchAny : true ,
68+ MatchAny : false ,
6969 NonEmptyAttrs : map [string ]bool {
7070 "deps" : true ,
7171 "main" : true ,
Original file line number Diff line number Diff line change 1+ load("@rules_python//python:defs.bzl", "py_library", "py_test")
2+
3+ py_library(
4+ name = "multiple_tests",
5+ srcs = ["__init__.py"],
6+ visibility = ["//:__subpackages__"],
7+ )
8+
9+ py_test(
10+ name = "bar_test",
11+ srcs = ["bar_test.py"],
12+ )
Original file line number Diff line number Diff line change 1+ load("@rules_python//python:defs.bzl", "py_library", "py_test")
2+
3+ py_library(
4+ name = "multiple_tests",
5+ srcs = ["__init__.py"],
6+ visibility = ["//:__subpackages__"],
7+ )
8+
9+ py_test(
10+ name = "bar_test",
11+ srcs = ["bar_test.py"],
12+ )
13+
14+ py_test(
15+ name = "foo_test",
16+ srcs = ["foo_test.py"],
17+ )
Original file line number Diff line number Diff line change 1+ # Multiple tests
2+
3+ This test case asserts that a second ` py_test ` rule is correctly created when a second ` *_test.py ` file is added to a package with an existing ` py_test ` rule.
Original file line number Diff line number Diff line change 1+ # This is a Bazel workspace for the Gazelle test data.
Original file line number Diff line number Diff line change 1+ # Copyright 2023 The Bazel Authors. All rights reserved.
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ import unittest
16+
17+
18+ class BarTest (unittest .TestCase ):
19+ def test_foo (self ):
20+ pass
21+
22+
23+ if __name__ == "__main__" :
24+ unittest .main ()
Original file line number Diff line number Diff line change 1+ # Copyright 2023 The Bazel Authors. All rights reserved.
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ import unittest
16+
17+
18+ class FooTest (unittest .TestCase ):
19+ def test_foo (self ):
20+ pass
21+
22+
23+ if __name__ == "__main__" :
24+ unittest .main ()
Original file line number Diff line number Diff line change 1+ # Copyright 2023 The Bazel Authors. All rights reserved.
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ ---
16+ expect :
17+ exit_code : 0
You can’t perform that action at this time.
0 commit comments