Test failures from sizeof str on win64

Bug #871448 reported by Martin Packman
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Meliae
New
Undecided
Unassigned

Bug Description

The following tests fail on win64, all of which are from expecting the sizeof str objects to be 4 bytes larger than they really are:

======================================================================
FAIL: test_empty_string (meliae.tests.test__scanner.TestSizeOf)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "meliae\tests\test__scanner.py", line 47, in test_empty_string
    self.assertSizeOf(STRING_SCALING, '', extra_size=0+STRING_BASE, has_gc=False)
  File "meliae\tests\test__scanner.py", line 43, in assertSizeOf
    self.assertEqual(expected_size, _scanner.size_of(obj))
AssertionError: 37 != 33

======================================================================
FAIL: test_long_string (meliae.tests.test__scanner.TestSizeOf)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "meliae\tests\test__scanner.py", line 54, in test_long_string
    extra_size=100*1024+STRING_BASE, has_gc=False)
  File "meliae\tests\test__scanner.py", line 43, in assertSizeOf
    self.assertEqual(expected_size, _scanner.size_of(obj))
AssertionError: 102437 != 102433

======================================================================
FAIL: test_short_string (meliae.tests.test__scanner.TestSizeOf)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "meliae\tests\test__scanner.py", line 50, in test_short_string
    self.assertSizeOf(STRING_SCALING, 'a', extra_size=1+STRING_BASE, has_gc=False)
  File "meliae\tests\test__scanner.py", line 43, in assertSizeOf
    self.assertEqual(expected_size, _scanner.size_of(obj))
AssertionError: 38 != 34

The estimates just need fixing here. The empty string should be sized as follows:

         2.6 2.7
 ILP32 24 21
  LP64 40 37
 LLP64 36 33

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.