Python2+3: make.py -n

pull/5848/head
Jimmy Brisson 2018-01-12 17:07:37 -06:00
parent 1dd39fbe80
commit 424ad856a9
1 changed files with 1 additions and 2 deletions

View File

@ -911,8 +911,7 @@ def test_known(string):
raise ArgumentTypeError("{0} does not index a test. The accepted range is 0 to {1}\nThe test mapping is:\n{2}".format(i, len(TEST_MAP) - 1, columnate([str(i) + ":" + t['id'] for i,t in zip(range(len(TESTS)), TESTS)])))
def test_name_known(string):
if string not in TEST_MAP.keys() and \
(getattr(ps, "test_alias", None) is None):
if string not in TEST_MAP.keys():
raise ArgumentTypeError("Program with name '{0}' not found. Supported tests are: \n{1}".format(string, columnate([t['id'] for t in TESTS])))
return TEST_MAP[string].n