From f416badceeb0bd980a3fcc1f1bbe7dc8b8949b4c Mon Sep 17 00:00:00 2001
From: Alexey Pavlov <alexpux@gmail.com>
Date: Fri, 5 Sep 2025 16:14:02 +0300
Subject: [PATCH 166/N] smoketests: Use new flag use_alt_sep

---
 mingw_smoketests.py | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/mingw_smoketests.py b/mingw_smoketests.py
index 2eb7ce8..c8ba089 100644
--- a/mingw_smoketests.py
+++ b/mingw_smoketests.py
@@ -25,11 +25,12 @@ and to test msys2 related modifications like for path handling.
 Feel free to extend.
 """
 
+import sys
 import os
 import unittest
 import sysconfig
 
-if os.environ.get("MSYSTEM", ""):
+if sys.use_alt_sep:
     SEP = "/"
 else:
     SEP = "\\"
@@ -63,7 +64,6 @@ class Tests(unittest.TestCase):
 
     # def test_sysconfig_schemes(self):
     #     # https://github.com/msys2/MINGW-packages/issues/9319
-    #     import sysconfig
     #     from distutils.dist import Distribution
     #     from distutils.command.install import install
 
@@ -91,7 +91,6 @@ class Tests(unittest.TestCase):
 
     def test_ctypes_dlopen(self):
         import ctypes
-        import sys
         self.assertEqual(ctypes.RTLD_GLOBAL, 0)
         self.assertEqual(ctypes.RTLD_GLOBAL,  ctypes.RTLD_LOCAL)
         self.assertFalse(hasattr(sys, 'setdlopenflags'))
@@ -175,7 +174,6 @@ class Tests(unittest.TestCase):
                 pass
 
     def test_sysconfig(self):
-        import sysconfig
         # This should be able to execute without exceptions
         sysconfig.get_config_vars()
 
@@ -189,7 +187,6 @@ class Tests(unittest.TestCase):
         import venv
         import subprocess
         import shutil
-        import sysconfig
         with tempfile.TemporaryDirectory() as tmp:
             builder = venv.EnvBuilder()
             builder.create(tmp)
@@ -216,8 +213,6 @@ class Tests(unittest.TestCase):
         mktime(gmtime())
 
     def test_platform_things(self):
-        import sys
-        import sysconfig
         import platform
         import importlib.machinery
         import tempfile
@@ -265,7 +260,6 @@ class Tests(unittest.TestCase):
 
     def test_sys_getpath(self):
         # everything sourced from getpath.py
-        import sys
 
         def assertNormpath(path):
             self.assertEqual(path, os.path.normpath(path))
@@ -288,7 +282,6 @@ class Tests(unittest.TestCase):
 
     def test_c_ext_build(self):
         import tempfile
-        import sys
         import subprocess
         import textwrap
         import venv
