Skip to content

Commit c15ee55

Browse files
committed
smoketests: add some tests for sys/site paths
1 parent 16d784e commit c15ee55

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

mingw_smoketests.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,29 @@ def test_platform_things(self):
238238
self.assertEqual(platform.system(), "Windows")
239239
self.assertTrue(isinstance(sys.api_version, int) and sys.api_version > 0)
240240

241+
def test_sys_getpath(self):
242+
# everything sourced from getpath.py
243+
import sys
244+
245+
def assertNormpath(path):
246+
self.assertEqual(path, os.path.normpath(path))
247+
248+
assertNormpath(sys.executable)
249+
assertNormpath(sys._base_executable)
250+
assertNormpath(sys.prefix)
251+
assertNormpath(sys.base_prefix)
252+
assertNormpath(sys.exec_prefix)
253+
assertNormpath(sys.base_exec_prefix)
254+
assertNormpath(sys.platlibdir)
255+
assertNormpath(sys._stdlib_dir)
256+
for p in sys.path:
257+
assertNormpath(p)
258+
259+
def test_site(self):
260+
import site
261+
262+
self.assertEqual(len(site.getsitepackages()), 1)
263+
241264
def test_c_ext_build(self):
242265
import tempfile
243266
import sys

0 commit comments

Comments
 (0)