Skip to content

Method stopTestRun() is not always called for skipped tests #89118

Closed

Description

@serhiy-storchaka
BPO 44955
Nosy @rbtcollins, @ezio-melotti, @voidspace, @serhiy-storchaka, @miss-islington
PRs
  • bpo-44955: Always call stopTestRun() for implicitly created TestResult objects #27831
  • [3.10] bpo-44955: Always call stopTestRun() for implicitly created TestResult objects (GH-27831) #27881
  • [3.9] bpo-44955: Always call stopTestRun() for implicitly created TestResult objects (GH-27831) #27882
  • 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 2021-08-22.18:18:44.462>
    created_at = <Date 2021-08-19.11:58:46.197>
    labels = ['type-bug', 'library', '3.9', '3.10', '3.11']
    title = 'Method stopTestRun() is not always called for skipped tests'
    updated_at = <Date 2021-08-22.18:18:44.462>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2021-08-22.18:18:44.462>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-08-22.18:18:44.462>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2021-08-19.11:58:46.197>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 44955
    keywords = ['patch']
    message_count = 4.0
    messages = ['399911', '400053', '400055', '400084']
    nosy_count = 5.0
    nosy_names = ['rbcollins', 'ezio.melotti', 'michael.foord', 'serhiy.storchaka', 'miss-islington']
    pr_nums = ['27831', '27881', '27882']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue44955'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    Activity

    1. serhiy-storchaka commented on Aug 19, 2021

      @serhiy-storchaka
      MemberAuthor

      Method startTestRun() is always called for the TestResult object implicitly created by TestCase.defaultTestResult() when no TestResult object is passed to TestCase.run(). But method stopTestRun() is not always called in pair with startTestRun() for skipped tests. It is only called if SkipTest was raised directly or indirectly (via skipTest()). It is not called if a skipping decorator (@Skip, @skipIf, @skipUnless) was used for a method or a class.

    2. added
      3.11only security fixes
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Aug 19, 2021
    3. serhiy-storchaka commented on Aug 22, 2021

      @serhiy-storchaka
      MemberAuthor

      New changeset a9640d7 by Serhiy Storchaka in branch 'main':
      bpo-44955: Always call stopTestRun() for implicitly created TestResult objects (GH-27831)
      a9640d7

    4. miss-islington commented on Aug 22, 2021

      @miss-islington
      Contributor

      New changeset d63114c by Miss Islington (bot) in branch '3.10':
      bpo-44955: Always call stopTestRun() for implicitly created TestResult objects (GH-27831)
      d63114c

    5. serhiy-storchaka commented on Aug 22, 2021

      @serhiy-storchaka
      MemberAuthor

      New changeset 4e5162f by Miss Islington (bot) in branch '3.9':
      bpo-44955: Always call stopTestRun() for implicitly created TestResult objects (GH-27831) (GH-27882)
      4e5162f

    6. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10 (EOL)end of life3.11only security fixes3.9 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions