Skip to content
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

Expect methods for testing. #47865

Closed
pupeno mannequin opened this issue Aug 20, 2008 · 4 comments
Closed

Expect methods for testing. #47865

pupeno mannequin opened this issue Aug 20, 2008 · 4 comments
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@pupeno
Copy link
Mannequin

pupeno mannequin commented Aug 20, 2008

BPO 3615
Nosy @pitrou, @voidspace
Files
  • expect.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2010-07-20.10:59:29.728>
    created_at = <Date 2008-08-20.08:49:12.831>
    labels = ['type-feature', 'library']
    title = 'Expect methods for testing.'
    updated_at = <Date 2010-07-20.10:59:29.726>
    user = 'https://bugs.python.org/pupeno'

    bugs.python.org fields:

    activity = <Date 2010-07-20.10:59:29.726>
    actor = 'michael.foord'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-07-20.10:59:29.728>
    closer = 'michael.foord'
    components = ['Library (Lib)']
    creation = <Date 2008-08-20.08:49:12.831>
    creator = 'pupeno'
    dependencies = []
    files = ['11171']
    hgrepos = []
    issue_num = 3615
    keywords = ['patch']
    message_count = 4.0
    messages = ['71518', '71529', '110683', '110882']
    nosy_count = 4.0
    nosy_names = ['pitrou', 'pupeno', 'michael.foord', 'BreamoreBoy']
    pr_nums = []
    priority = 'normal'
    resolution = 'wont fix'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue3615'
    versions = ['Python 3.1', 'Python 2.7']

    @pupeno
    Copy link
    Mannequin Author

    pupeno mannequin commented Aug 20, 2008

    I'm attaching a patch that adds expect methods to TestCase. They are
    like fail methods, but they don't fail immediately. They are useful when
    you want to catch more than one error at a time.
    I included some tests.
    There are docstrings but more documentation might be needed. I'll gladly
    write it if/when the code is good to go.
    The original code was written by Donovan Baarda for an internal project
    at Google, I only extracted the bits that made sense to publish and
    changed the style to me more Python-alike.

    @pupeno pupeno mannequin added the stdlib Python modules in the Lib dir label Aug 20, 2008
    @pitrou
    Copy link
    Member

    pitrou commented Aug 20, 2008

    Interesting, but it should be discussed on the mailing-list first.
    Also, since this is a new feature, it must be retargeted to 2.7/3.1.

    @pitrou pitrou added the type-feature A feature request or enhancement label Aug 20, 2008
    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Jul 18, 2010

    Can't see this going anywhere, might as well close unless someone is really interested.

    @voidspace
    Copy link
    Contributor

    The API on TestCase is already too wide without adding more methods. This is easy enough to do in a TestCase subclass for those who want it.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants