Skip to content

Commit f6bf4a7

Browse files
authored
Merge pull request winpython#1155 from stonebig/master
remove osp from test.py
2 parents 33b6050 + 5bbf3a2 commit f6bf4a7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
import sys
1616
import os
17-
import os.path as osp
17+
# import os.path as osp
18+
from pathlib import Path
1819
import re
1920

2021
# Local imports
@@ -25,9 +26,12 @@ def test_python_packages(pyver):
2526
"""Check if all Python packages are supported by WinPython"""
2627
basedir = utils.get_basedir(pyver)
2728
for suffix in ('src', 'win32', 'win-amd64'):
28-
dirname = osp.join(basedir, 'packages.%s' % suffix)
29+
# dirname = osp.join(basedir, 'packages.%s' % suffix)
30+
dirname = str(Path(basedir) / f'packages.{suffix}')
2931
for name in os.listdir(dirname):
30-
if osp.isfile(osp.join(dirname, name)) \
32+
# if osp.isfile(osp.join(dirname, name)) \
33+
# if osp.isfile(str(Path(dirname) / name)) \
34+
if (Path(dirname) / name).is_file() \
3135
and not re.match(r'python-([0-9\.]*)(\.amd64)?\.msi', name):
3236
try:
3337
print(wppm.Package(name))

0 commit comments

Comments
 (0)