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

Patch to flush unittest output #47036

Closed
Rhamphoryncus mannequin opened this issue May 7, 2008 · 3 comments
Closed

Patch to flush unittest output #47036

Rhamphoryncus mannequin opened this issue May 7, 2008 · 3 comments

Comments

@Rhamphoryncus
Copy link
Mannequin

Rhamphoryncus mannequin commented May 7, 2008

BPO 2787
Nosy @birkenfeld
Files
  • python-unittest_flush.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 2008-05-11.15:17:52.390>
    created_at = <Date 2008-05-07.21:27:24.188>
    labels = []
    title = 'Patch to flush unittest output'
    updated_at = <Date 2008-05-11.15:17:52.211>
    user = 'https://bugs.python.org/Rhamphoryncus'

    bugs.python.org fields:

    activity = <Date 2008-05-11.15:17:52.211>
    actor = 'georg.brandl'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-05-11.15:17:52.390>
    closer = 'georg.brandl'
    components = []
    creation = <Date 2008-05-07.21:27:24.188>
    creator = 'Rhamphoryncus'
    dependencies = []
    files = ['10211']
    hgrepos = []
    issue_num = 2787
    keywords = ['patch']
    message_count = 3.0
    messages = ['66375', '66376', '66639']
    nosy_count = 2.0
    nosy_names = ['georg.brandl', 'Rhamphoryncus']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue2787'
    versions = ['Python 3.0']

    @Rhamphoryncus
    Copy link
    Mannequin Author

    Rhamphoryncus mannequin commented May 7, 2008

    In 3.0, unittest's output has become line buffered. Instead of printing
    the test name when it starts a test, then "ok" when it finishes, the
    test name is delayed until the "ok" is printed. This makes it
    unnecessarily hard to determine which test is hanging or segfaulted.

    The attached patch adds explicit flushes.

    An alternative approach would be to force stdout to be unbuffered
    somehow. I don't know how difficult that would be.

    @Rhamphoryncus
    Copy link
    Mannequin Author

    Rhamphoryncus mannequin commented May 7, 2008

    Hrm, this behaviour exists in trunk as well. I must be confused about
    the cause (but the patch still fixes it.)

    @birkenfeld
    Copy link
    Member

    Thanks, committed patch as r63069.

    @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
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant