MINGW-packages/mingw-w64-python3.13/0096-smoketests-add-some-tests-for-sys-site-paths.patch
Christoph Reiter 04c9ed3700 python3.13: Add 3.13.7
* add libb2 as dep
* remove "-Wl,--large-address-aware", default now via makepkg
* remove 2to3 logic, no longer in Python
2025-09-08 22:02:30 +02:00

44 lines
1.4 KiB
Diff

From b391684a18c9e2ee4e95270782bba8eedcb6ccf4 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Fri, 28 Jul 2023 20:15:01 +0200
Subject: [PATCH 096/N] smoketests: add some tests for sys/site paths
---
mingw_smoketests.py | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/mingw_smoketests.py b/mingw_smoketests.py
index 00601f9..516005c 100644
--- a/mingw_smoketests.py
+++ b/mingw_smoketests.py
@@ -238,6 +238,29 @@ class Tests(unittest.TestCase):
self.assertEqual(platform.system(), "Windows")
self.assertTrue(isinstance(sys.api_version, int) and sys.api_version > 0)
+ def test_sys_getpath(self):
+ # everything sourced from getpath.py
+ import sys
+
+ def assertNormpath(path):
+ self.assertEqual(path, os.path.normpath(path))
+
+ assertNormpath(sys.executable)
+ assertNormpath(sys._base_executable)
+ assertNormpath(sys.prefix)
+ assertNormpath(sys.base_prefix)
+ assertNormpath(sys.exec_prefix)
+ assertNormpath(sys.base_exec_prefix)
+ assertNormpath(sys.platlibdir)
+ assertNormpath(sys._stdlib_dir)
+ for p in sys.path:
+ assertNormpath(p)
+
+ def test_site(self):
+ import site
+
+ self.assertEqual(len(site.getsitepackages()), 1)
+
def test_c_ext_build(self):
import tempfile
import sys