Skip to content

improve bytes and bytearray tests #46264

Closed

Description

@pitrou
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']

    Activity

    1. pitrou commented on Jan 30, 2008

      @pitrou
      MemberAuthor

      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.

    2. tiran commented on Jan 30, 2008

      @tiran
      Member

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

    3. pitrou commented on Jan 30, 2008

      @pitrou
      MemberAuthor

      Ok, here is a patch using type2test instead :)

    4. pitrou commented on Jan 30, 2008

      @pitrou
      MemberAuthor

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

    5. tiran commented on Jan 30, 2008

      @tiran
      Member

      Thanks again! Applied in r60442

    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

      testsTests in the Lib/test dirtype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions