Skip to content

test_binascii is failing #48764

Closed
Closed

Description

@rhettinger
BPO 4514
Nosy @loewis, @rhettinger, @amauryfa
Superseder
  • bpo-4542: test_binascii fails on windows
  • 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/loewis'
    closed_at = <Date 2008-12-05.01:44:06.112>
    created_at = <Date 2008-12-04.03:15:18.849>
    labels = ['extension-modules']
    title = 'test_binascii is failing'
    updated_at = <Date 2008-12-05.01:44:06.110>
    user = 'https://github.com/rhettinger'

    bugs.python.org fields:

    activity = <Date 2008-12-05.01:44:06.110>
    actor = 'amaury.forgeotdarc'
    assignee = 'loewis'
    closed = True
    closed_date = <Date 2008-12-05.01:44:06.112>
    closer = 'amaury.forgeotdarc'
    components = ['Extension Modules']
    creation = <Date 2008-12-04.03:15:18.849>
    creator = 'rhettinger'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 4514
    keywords = []
    message_count = 3.0
    messages = ['76864', '76874', '76965']
    nosy_count = 3.0
    nosy_names = ['loewis', 'rhettinger', 'amaury.forgeotdarc']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = '4542'
    type = None
    url = 'https://bugs.python.org/issue4514'
    versions = ['Python 3.0']

    Activity

    1. rhettinger commented on Dec 4, 2008

      @rhettinger
      ContributorAuthor

      test_binascii.py fails because crc32 accepts a string.

      From my WindowsXP box:

      C:\Python30>python \python30\lib\test\test_binascii.py
      test_base64invalid (main.BinASCIITest) ... ok
      test_base64valid (main.BinASCIITest) ... ok
      test_crc32 (main.BinASCIITest) ... ok
      test_empty_string (main.BinASCIITest) ... ok
      test_exceptions (main.BinASCIITest) ... ok
      test_functions (main.BinASCIITest) ... ok
      test_hex (main.BinASCIITest) ... ok
      test_no_binary_strings (main.BinASCIITest) ... FAIL
      test_qp (main.BinASCIITest) ... ok
      test_uu (main.BinASCIITest) ... ok

      ======================================================================
      FAIL: test_no_binary_strings (main.BinASCIITest)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "\python30\lib\test\test_binascii.py", line 177, in
      test_no_binary_strings
          self.assertRaises(TypeError, f, "test")
      AssertionError: TypeError not raised by crc32

      Ran 10 tests in 0.016s

      FAILED (failures=1)
      Traceback (most recent call last):
        File "\python30\lib\test\test_binascii.py", line 183, in <module>
          test_main()
        File "\python30\lib\test\test_binascii.py", line 180, in test_main
          support.run_unittest(BinASCIITest)
        File "C:\Python30\lib\test\support.py", line 698, in run_unittest
          _run_suite(suite)
        File "C:\Python30\lib\test\support.py", line 681, in _run_suite
          raise TestFailed(err)
      test.support.TestFailed: Traceback (most recent call last):
        File "\python30\lib\test\test_binascii.py", line 177, in
      test_no_binary_strings
          self.assertRaises(TypeError, f, "test")
      AssertionError: TypeError not raised by crc32
    2. loewis commented on Dec 4, 2008

      loewismannequin
      Mannequin

      The problem is that the Windows implementation of crc32 is different
      from the Unix implementation, and that implementation was missed in
      r67472. The fix should be fairly trivial.

    3. amauryfa commented on Dec 5, 2008

      @amauryfa
      Contributor

      I fixed this in r67541 and r67542, with bpo-4542.
      (sorry I did not see this one)

    4. 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

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions