A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-May/072964.html below:

[Python-Dev] x64 and the testsuite

[Python-Dev] x64 and the testsuiteThomas Heller theller at ctypes.org
Thu May 3 19:03:45 CEST 2007
Kristján Valur Jónsson schrieb:
> Hello again.
> A lot of overflow tests fail in the testsuite, by expecting overflow using sys.maxint.
> for example this line, 196, in test_index.py: self.assertEqual(x[self.neg:self.pos], (-1, maxint))

On my (virtual) win64-machine, which has less than 1GB, quite some tests fail with MemoryError.
The tests pass on 64-bit linux machines, though.

> At the moment, I am disabling these tests with
> if "64 bit" not in sys.version:
> 
> So, two questions:  Should we add something like sys.maxsize to keep these overflow tests valid?
> 
> Also, some tests just kill the computer when given large values, that are expected to overflow.  Sometimes
> it would be good to test for a 64 bit machine with virtually infinite ram.  Is there a better way
> than the "64 bit" in sys.version test?  Should we have something like sys.bits?

You can use 'struct.calcsize("P")' to find out the pointer size.

Thomas

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4