Skip to content

Commit

Permalink
smoketests: add some tests for sys/site paths
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed Aug 25, 2023
1 parent 16d784e commit c15ee55
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions mingw_smoketests.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,29 @@ def test_platform_things(self):
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
Expand Down

0 comments on commit c15ee55

Please sign in to comment.