Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04b2e69 commit 094d0e0Copy full SHA for 094d0e0
1 file changed
Lib/test/test_buffer.py
@@ -16,7 +16,6 @@
16
from itertools import permutations, product
17
from random import randrange, sample, choice
18
from sysconfig import get_config_var
19
-from platform import architecture
20
import warnings
21
import sys, array, io
22
from decimal import Decimal
@@ -748,9 +747,10 @@ def ndarray_print(nd):
748
747
class TestBufferProtocol(unittest.TestCase):
749
750
def setUp(self):
751
- self.sizeof_void_p = get_config_var('SIZEOF_VOID_P')
+ self.sizeof_void_p = get_config_var('SIZEOF_VOID_P') \
+ if sys.platform != 'darwin' else None
752
if not self.sizeof_void_p:
753
- self.sizeof_void_p = 8 if architecture()[0] == '64bit' else 4
+ self.sizeof_void_p = 8 if sys.maxsize > 2**32 else 4
754
755
def verify(self, result, obj=-1,
756
itemsize={1}, fmt=-1, readonly={1},
0 commit comments