Skip to content

BUG: Dont use assert for a test #120

@lpointal

Description

@lpointal

When running with -O or -OO options assert are dismissed, so the line which call regular expression to test the email is not executed.

In place of

assert re.match(VALID_ADDRESS_REGEXP, email) is not None

You should write

if re.match(VALID_ADDRESS_REGEXP, email) is None:
    return False

(or raise an exception if you prefer)

A+
L.Pointal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions