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

Lib/test/test_dataclasses.py failed when ran as a script #78365

Closed
serhiy-storchaka opened this issue Jul 21, 2018 · 3 comments
Closed

Lib/test/test_dataclasses.py failed when ran as a script #78365

serhiy-storchaka opened this issue Jul 21, 2018 · 3 comments
Assignees
Labels
3.7 (EOL) end of life 3.8 only security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

BPO 34184
Nosy @ericvsmith, @serhiy-storchaka
PRs
  • bpo-34184: Fix running Lib/test/test_dataclasses.py as a script. #8382
  • [3.7] bpo-34184: Fix running Lib/test/test_dataclasses.py as a script. (GH-8382) #8421
  • 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/serhiy-storchaka'
    closed_at = <Date 2018-07-23.22:05:18.525>
    created_at = <Date 2018-07-21.17:47:26.165>
    labels = ['3.7', '3.8', 'type-bug', 'tests']
    title = 'Lib/test/test_dataclasses.py failed when ran as a script'
    updated_at = <Date 2018-07-23.22:05:18.524>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2018-07-23.22:05:18.524>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2018-07-23.22:05:18.525>
    closer = 'serhiy.storchaka'
    components = ['Tests']
    creation = <Date 2018-07-21.17:47:26.165>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34184
    keywords = ['patch']
    message_count = 3.0
    messages = ['322113', '322254', '322259']
    nosy_count = 2.0
    nosy_names = ['eric.smith', 'serhiy.storchaka']
    pr_nums = ['8382', '8421']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue34184'
    versions = ['Python 3.7', 'Python 3.8']

    @serhiy-storchaka
    Copy link
    Member Author

    $ ./python Lib/test/test_dataclasses.py
    ...

    ======================================================================
    ERROR: test_classvar_module_level_import (main.TestStringAnnotations)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "Lib/test/test_dataclasses.py", line 2716, in test_classvar_module_level_import
        from . import dataclass_module_1
    ImportError: cannot import name 'dataclass_module_1' from '__main__' (Lib/test/test_dataclasses.py)

    ======================================================================
    FAIL: test_no_repr (main.TestRepr)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "Lib/test/test_dataclasses.py", line 1970, in test_no_repr
        repr(C(3)))
    AssertionError: 'test_dataclasses.TestRepr.test_no_repr.<locals>.C object at' not found in '<__main__.TestRepr.test_no_repr.<locals>.C object at 0x7f11745df2c8>'

    @serhiy-storchaka serhiy-storchaka added 3.7 (EOL) end of life 3.8 only security fixes labels Jul 21, 2018
    @serhiy-storchaka serhiy-storchaka self-assigned this Jul 21, 2018
    @serhiy-storchaka serhiy-storchaka added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Jul 21, 2018
    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 3fe5ccc by Serhiy Storchaka in branch 'master':
    bpo-34184: Fix running Lib/test/test_dataclasses.py as a script. (GH-8382)
    3fe5ccc

    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 6353382 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7':
    bpo-34184: Fix running Lib/test/test_dataclasses.py as a script. (GH-8382) (GH-8421)
    6353382

    @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
    3.7 (EOL) end of life 3.8 only security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant