Skip to content

[3.7] bpo-25094: Fix test_tools.test_sundry() on Windows (GH-8406) #8407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions Lib/test/test_tools/test_sundry.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,25 @@ class TestSundryScripts(unittest.TestCase):
# scripts that use windows-only modules
windows_only = ['win_add2path']
# blacklisted for other reasons
other = ['analyze_dxp']
other = ['analyze_dxp', '2to3']

skiplist = blacklist + whitelist + windows_only + other

def test_sundry(self):
for fn in os.listdir(scriptsdir):
name = fn[:-3]
if fn.endswith('.py') and name not in self.skiplist:
old_modules = support.modules_setup()
try:
for fn in os.listdir(scriptsdir):
if not fn.endswith('.py'):
continue

name = fn[:-3]
if name in self.skiplist:
continue

import_tool(name)
finally:
# Unload all modules loaded in this test
support.modules_cleanup(*old_modules)

@unittest.skipIf(sys.platform != "win32", "Windows-only test")
def test_sundry_windows(self):
Expand Down