44 lines
1.4 KiB
Diff
44 lines
1.4 KiB
Diff
From 38612d894aaf3266a14e29e9508bc14c663b8f96 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 098/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
|