Skip to content

Commit aa9a4aa

Browse files
committed
Fix test
* Fix test on Windows * Skip test if missing (tools are not installed)
1 parent d6fd2d4 commit aa9a4aa

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎Lib/test/test_tools/test_getbuildinfo.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@
1111
from test.support import os_helper
1212
from test import test_tools
1313

14-
SRC_DIR = os.path.dirname(test_tools.toolsdir)
14+
15+
test_tools.skip_if_missing("build")
1516

1617
with test_tools.imports_under_tool('build'):
1718
import generate_getbuildinfo
1819

20+
SRC_DIR = os.path.dirname(test_tools.toolsdir)
21+
1922

2023
class TestGetBuildInfo(unittest.TestCase):
2124
def test_get_py_version(self):
@@ -64,7 +67,7 @@ def test_get_build_info(self):
6467
(f'main, {date_time}', 'main'))
6568

6669
def test_get_compiler(self):
67-
getcompiler = 'Programs/_getcompiler'
70+
getcompiler = os.path.join('Programs', '_getcompiler')
6871
MOCK_COMPILER = 'MOCK_COMPILER'
6972

7073
for hostrunner in ('', 'node'):

0 commit comments

Comments
 (0)