Skip to content

Commit 74c0b41

Browse files
committed
add test to demonstrate error
1 parent 60d4b91 commit 74c0b41

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
2+
load("//python/private:util.bzl", "IS_BAZEL_7_OR_HIGHER") # buildifier: disable=bzl-visibility
3+
load("//tests/support:sh_py_run_test.bzl", "py_reconfig_test", "sh_py_run_test")
4+
5+
_SUPPORTS_BOOTSTRAP_SCRIPT = select({
6+
"@platforms//os:windows": ["@platforms//:incompatible"],
7+
"//conditions:default": [],
8+
}) if IS_BAZEL_7_OR_HIGHER else ["@platforms//:incompatible"]
9+
10+
py_reconfig_test(
11+
name = "nested_dir_test",
12+
srcs = ["nested_dir_test.py"],
13+
bootstrap_impl = "script",
14+
main = "nested_dir_test.py",
15+
target_compatible_with = _SUPPORTS_BOOTSTRAP_SCRIPT,
16+
)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2024 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+
"""Test that the binary being a different directory depth than the underlying interpreter works."""
15+
16+
import unittest
17+
18+
class RunsTest(unittest.TestCase):
19+
def test_runs(self):
20+
pass
21+
22+
unittest.main()

0 commit comments

Comments
 (0)