Exemplo n.º 1
0
        return {y: i for i in range(x)}
    except NameError:
        pass


def simpleFunction3():
    return {i for i in range(x)}


def simpleFunction4():
    try:
        return {y for i in range(x)}
    except NameError:
        pass


# These need stderr to be wrapped.
tests_stderr = ()

# Disabled tests
tests_skipped = {}

result = executeReferenceChecked(
    prefix="simpleFunction",
    names=globals(),
    tests_skipped=tests_skipped,
    tests_stderr=tests_stderr,
)

sys.exit(0 if result else 1)
Exemplo n.º 2
0
def simpleFunction2():
    try:
        return {y:i for i in range(x)}  # @UndefinedVariable
    except NameError:
        pass

def simpleFunction3():
    return {i for i in range(x)}

def simpleFunction4():
    try:
        return {y for i in range(x)}  # @UndefinedVariable @UnusedVariable
    except NameError:
        pass

# These need stderr to be wrapped.
tests_stderr = ()

# Disabled tests
tests_skipped = {}

result = executeReferenceChecked(
    prefix        = "simpleFunction",
    names         = globals(),
    tests_skipped = tests_skipped,
    tests_stderr  = tests_stderr
)

sys.exit(0 if result else 1)