File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 1515""
1616
1717load ("//python:versions.bzl" , "PLATFORMS" , "TOOL_VERSIONS" )
18+ load ("//python/private:version.bzl" , "version" ) # buildifier: disable=bzl-visibility
1819load ("//tests/support:py_reconfig.bzl" , "py_reconfig_test" )
1920
2021def define_toolchain_tests (name ):
@@ -38,13 +39,15 @@ def define_toolchain_tests(name):
3839 is_platform = "_is_{}" .format (platform_key )
3940 target_compatible_with [is_platform ] = []
4041
42+ parsed = version .parse (python_version , strict = True )
43+ expect_python_version = "{0}.{1}.{2}" .format (* parsed .release )
4144 py_reconfig_test (
4245 name = "python_{}_test" .format (python_version ),
4346 srcs = ["python_toolchain_test.py" ],
4447 main = "python_toolchain_test.py" ,
4548 python_version = python_version ,
4649 env = {
47- "EXPECT_PYTHON_VERSION" : python_version ,
50+ "EXPECT_PYTHON_VERSION" : expect_python_version ,
4851 },
4952 deps = ["//python/runfiles" ],
5053 data = ["//tests/support:current_build_settings" ],
Original file line number Diff line number Diff line change 33import pathlib
44import pprint
55import sys
6+ import textwrap
67import unittest
78
9+ print ("PYTHONPATH is:" )
10+ print (textwrap .indent ("\n " .join (sys .path ), prefix = " " * 4 ))
811from python .runfiles import runfiles
912
1013
You can’t perform that action at this time.
0 commit comments