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

Fix test discovery for test_io.py #61681

Closed
zware opened this issue Mar 19, 2013 · 3 comments
Closed

Fix test discovery for test_io.py #61681

zware opened this issue Mar 19, 2013 · 3 comments
Assignees
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@zware
Copy link
Member

zware commented Mar 19, 2013

BPO 17479
Nosy @brettcannon, @ezio-melotti, @zware
Files
  • test_io_discovery.diff: test_io.py fix, version 1
  • 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 = 'https://github.com/ezio-melotti'
    closed_at = <Date 2013-03-23.14:37:52.693>
    created_at = <Date 2013-03-19.15:05:26.004>
    labels = ['type-bug', 'tests']
    title = 'Fix test discovery for test_io.py'
    updated_at = <Date 2013-03-23.14:37:52.692>
    user = 'https://github.com/zware'

    bugs.python.org fields:

    activity = <Date 2013-03-23.14:37:52.692>
    actor = 'ezio.melotti'
    assignee = 'ezio.melotti'
    closed = True
    closed_date = <Date 2013-03-23.14:37:52.693>
    closer = 'ezio.melotti'
    components = ['Tests']
    creation = <Date 2013-03-19.15:05:26.004>
    creator = 'zach.ware'
    dependencies = []
    files = ['29478']
    hgrepos = []
    issue_num = 17479
    keywords = ['patch']
    message_count = 3.0
    messages = ['184636', '185051', '185052']
    nosy_count = 4.0
    nosy_names = ['brett.cannon', 'ezio.melotti', 'python-dev', 'zach.ware']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue17479'
    versions = ['Python 3.3', 'Python 3.4']

    @zware
    Copy link
    Member Author

    zware commented Mar 19, 2013

    This patch converts test_main() to load_tests(*args) due to test_main doing a lot of namespace manipulation on all the test classes. There are a lot of subclassing issues that discovery doesn't like, hence throwing away the second argument passed to load_tests and just creating the tests the way test_main did.

    @zware zware added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Mar 19, 2013
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 23, 2013

    New changeset fa9e189e30ad by Ezio Melotti in branch '3.3':
    bpo-17479: test_io now works with unittest test discovery. Patch by Zachary Ware.
    http://hg.python.org/cpython/rev/fa9e189e30ad

    New changeset 99a81681237d by Ezio Melotti in branch 'default':
    bpo-17479: merge with 3.3.
    http://hg.python.org/cpython/rev/99a81681237d

    @ezio-melotti
    Copy link
    Member

    Fixed, thanks for the patch!

    @ezio-melotti ezio-melotti self-assigned this Mar 23, 2013
    @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
    tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants