Skip to content

Commit

Permalink
Add unit tests capturing the expectation
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 21, 2022
1 parent 9079e77 commit 5152a55
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions distutils/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 5152a55

Please sign in to comment.