Skip to content

Commit

Permalink
Allow (quoted) spaces in ignore_fields field names.
Browse files Browse the repository at this point in the history
  • Loading branch information
James Spencer committed Mar 31, 2015
1 parent 2cc7597 commit ef7cd2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/userconfig.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ ignore_fields [space-separated list of strings]
Specify the fields (e.g. column headings in the output from the extraction
program) to ignore. This can be used to include, say, timing information
in the test output for performance comparison without causing failure of
tests. No default.
tests. Spaces within a string can be escaped by quoting the string. No
default.
exe [string]
Path to the program executable. No default.
extract_fn [string]
Expand Down
3 changes: 2 additions & 1 deletion lib/testcode2/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import copy
import glob
import os
import shlex
import subprocess
import time
import warnings
Expand Down Expand Up @@ -116,7 +117,7 @@ def parse_userconfig(config_file, executables=None, test_id=None,
if userconfig.has_option(section, item):
tp_dict[item] = userconfig.get(section, item)
if 'ignore_fields' in tp_dict:
tp_dict['ignore_fields'] = tp_dict['ignore_fields'].split()
tp_dict['ignore_fields'] = shlex.split(tp_dict['ignore_fields'])
if section in executables:
exe = executables[section]
elif '_tc_all' in executables:
Expand Down

0 comments on commit ef7cd2b

Please sign in to comment.