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

improve bytes and bytearray tests #46264

Closed
pitrou opened this issue Jan 30, 2008 · 5 comments
Closed

improve bytes and bytearray tests #46264

pitrou opened this issue Jan 30, 2008 · 5 comments
Labels
tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@pitrou
Copy link
Member

pitrou commented Jan 30, 2008

BPO 1972
Nosy @pitrou, @tiran
Files
  • bytestest.patch
  • bytestest.patch
  • bytestest.patch: updated patch without workaround for fixed bytes.fromhex bug
  • 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-01-30.11:58:34.830>
    created_at = <Date 2008-01-30.10:57:03.514>
    labels = ['type-feature', 'tests']
    title = 'improve bytes and bytearray tests'
    updated_at = <Date 2008-01-30.11:58:34.829>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2008-01-30.11:58:34.829>
    actor = 'christian.heimes'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-01-30.11:58:34.830>
    closer = 'christian.heimes'
    components = ['Tests']
    creation = <Date 2008-01-30.10:57:03.514>
    creator = 'pitrou'
    dependencies = []
    files = ['9328', '9330', '9331']
    hgrepos = []
    issue_num = 1972
    keywords = ['patch']
    message_count = 5.0
    messages = ['61854', '61859', '61863', '61864', '61865']
    nosy_count = 2.0
    nosy_names = ['pitrou', 'christian.heimes']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue1972'
    versions = ['Python 3.0']

    @pitrou
    Copy link
    Member Author

    pitrou commented Jan 30, 2008

    Currently some tests in test_bytes.py only test bytearray, others only
    test bytes. Here is a patch to try to make test coverage more extensive.
    You'll notice there is a small hack in test_fromhex, that's because
    bytes.fromhex is buggy, I'll open a separate bug entry for that.

    @pitrou pitrou added the tests Tests in the Lib/test dir label Jan 30, 2008
    @tiran
    Copy link
    Member

    tiran commented Jan 30, 2008

    Good idea but could you please use typ2test instead of a decorator? It
    involves too much magic.

    @tiran tiran added the type-feature A feature request or enhancement label Jan 30, 2008
    @pitrou
    Copy link
    Member Author

    pitrou commented Jan 30, 2008

    Ok, here is a patch using type2test instead :)

    @pitrou
    Copy link
    Member Author

    pitrou commented Jan 30, 2008

    Hmm, that "import functools" at top of the file certainly can be removed...

    @tiran
    Copy link
    Member

    tiran commented Jan 30, 2008

    Thanks again! Applied in r60442

    @tiran tiran closed this as completed Jan 30, 2008
    @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-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants