Skip to content

fixing Nonetype not iterable error #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions cwltest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,11 @@ def run_test(args, i, tests): # type: (argparse.Namespace, int, List[Dict[str,
test_command.extend(args.args)

# Add additional arguments given in test case
for testarg in args.testargs:
(test_case_name, prefix) = testarg.split('==')
if test_case_name in t:
test_command.extend([prefix, t[test_case_name]])
if args.testargs is not None:
for testarg in args.testargs:
(test_case_name, prefix) = testarg.split('==')
if test_case_name in t:
test_command.extend([prefix, t[test_case_name]])

# Add prefixes if running on MacOSX so that boot2docker writes to /Users
if 'darwin' in sys.platform:
Expand Down Expand Up @@ -266,7 +267,8 @@ def main(): # type: () -> int
args.args.remove('--')

# Remove test arguments with wrong syntax
args.testargs = [testarg for testarg in args.testargs if testarg.count('==') == 1]
if args.testargs is not None:
args.testargs = [testarg for testarg in args.testargs if testarg.count('==') == 1]

if not args.test:
parser.print_help()
Expand Down