MCPcopy Index your code
hub / github.com/python/cpython / test

Function test

Tools/freeze/parsesetup.py:83–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81# Test the above functions.
82
83def test():
84 import sys
85 import os
86 if not sys.argv[1:]:
87 print('usage: python parsesetup.py Makefile*|Setup* ...')
88 sys.exit(2)
89 for arg in sys.argv[1:]:
90 base = os.path.basename(arg)
91 if base[:8] == 'Makefile':
92 print('Make style parsing:', arg)
93 v = getmakevars(arg)
94 prdict(v)
95 elif base[:5] == 'Setup':
96 print('Setup style parsing:', arg)
97 m, v = getsetupinfo(arg)
98 prdict(m)
99 prdict(v)
100 else:
101 print(arg, 'is neither a Makefile nor a Setup file')
102 print('(name must begin with "Makefile" or "Setup")')
103
104def prdict(d):
105 keys = sorted(d.keys())

Callers 1

parsesetup.pyFile · 0.70

Calls 5

getmakevarsFunction · 0.85
prdictFunction · 0.85
getsetupinfoFunction · 0.85
exitMethod · 0.45
basenameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…