Commit 6b918b14 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Simplify the driver a bit: Break skip_{if,unless}_tag down into smaller parts

parent 163365fa
......@@ -286,19 +286,17 @@ def _namebase( opts, nb ):
# ---
def skip_if_tag( tag ):
return lambda opts, t=tag: _skip_if_tag(opts, t)
def _skip_if_tag( opts, tag ):
def if_tag( tag, f ):
if tag in config.compiler_tags:
opts.skip = 1
def skip_unless_tag( tag ):
return lambda opts, t=tag: _skip_unless_tag(opts, t)
return f
else:
return normal
def _skip_unless_tag( opts, tag ):
def unless_tag( tag, f ):
if not (tag in config.compiler_tags):
opts.skip = 1
return f
else:
return normal
# ---
def alone(opts):
......
esc = skip_unless_tag('esc')
esc = unless_tag('esc', skip)
test('TestList', esc, compile, ['-fesc'])
test('TestImport', esc, compile, ['-fesc'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment