summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2022-08-21 15:41:03 -0400
committerJason R. Coombs <jaraco@jaraco.com>2022-08-21 15:45:50 -0400
commit5152a55c9fdbb76f5bfc9035521d7d7ad2054166 (patch)
treeb7375e767118f25ce55fb52e929111a8521ebde0
parent9079e77d4ca8fedc62c2040f691dfd2e7205217d (diff)
downloadpython-setuptools-git-5152a55c9fdbb76f5bfc9035521d7d7ad2054166.tar.gz
Add unit tests capturing the expectation
-rw-r--r--distutils/sysconfig.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/distutils/sysconfig.py b/distutils/sysconfig.py
index 4b722043..3dd8185f 100644
--- a/distutils/sysconfig.py
+++ b/distutils/sysconfig.py
@@ -164,6 +164,16 @@ def _get_python_inc_from_config(plat_specific, spec_prefix):
the host
platform Python installation, while the current Python
executable is from the build platform installation.
+
+ >>> monkeypatch = getfixture('monkeypatch')
+ >>> gpifc = _get_python_inc_from_config
+ >>> monkeypatch.setitem(gpifc.__globals__, 'get_config_var', str.lower)
+ >>> gpifc(False, '/usr/bin/')
+ >>> gpifc(False, '')
+ >>> gpifc(False, None)
+ 'includepy'
+ >>> gpifc(True, None)
+ 'confincludepy'
"""
if spec_prefix is None:
return get_config_var('CONF' * plat_specific + 'INCLUDEPY')