Back to index

python3.2  3.2.2
Classes | Functions | Variables
test.test_float Namespace Reference

Classes

class  GeneralFloatCases
class  FormatFunctionsTestCase
class  UnknownFormatTestCase
class  IEEEFormatTestCase
class  FormatTestCase
class  ReprTestCase
class  RoundTestCase
class  InfNanTest
class  HexFloatTestCase

Functions

def test_main

Variables

tuple INF = float("inf")
tuple NAN = float("nan")
tuple have_getformat = hasattr(float, "__getformat__")
tuple requires_getformat
tuple requires_setformat
tuple test_dir = os.path.dirname(__file__)
tuple format_testfile = os.path.join(test_dir, 'formatfloat_testcases.txt')
string BE_DOUBLE_INF = '\x7f\xf0\x00\x00\x00\x00\x00\x00'
tuple LE_DOUBLE_INF = bytes(reversed(BE_DOUBLE_INF))
string BE_DOUBLE_NAN = '\x7f\xf8\x00\x00\x00\x00\x00\x00'
tuple LE_DOUBLE_NAN = bytes(reversed(BE_DOUBLE_NAN))
string BE_FLOAT_INF = '\x7f\x80\x00\x00'
tuple LE_FLOAT_INF = bytes(reversed(BE_FLOAT_INF))
string BE_FLOAT_NAN = '\x7f\xc0\x00\x00'
tuple LE_FLOAT_NAN = bytes(reversed(BE_FLOAT_NAN))
 fromHex = float.fromhex
 toHex = float.hex

Function Documentation

Definition at line 1288 of file test_float.py.

01288 
01289 def test_main():
01290     support.run_unittest(
01291         GeneralFloatCases,
01292         FormatFunctionsTestCase,
01293         UnknownFormatTestCase,
01294         IEEEFormatTestCase,
01295         FormatTestCase,
01296         ReprTestCase,
01297         RoundTestCase,
01298         InfNanTest,
01299         HexFloatTestCase,
01300         )


Variable Documentation

string test.test_float.BE_DOUBLE_INF = '\x7f\xf0\x00\x00\x00\x00\x00\x00'

Definition at line 455 of file test_float.py.

string test.test_float.BE_DOUBLE_NAN = '\x7f\xf8\x00\x00\x00\x00\x00\x00'

Definition at line 457 of file test_float.py.

string test.test_float.BE_FLOAT_INF = '\x7f\x80\x00\x00'

Definition at line 460 of file test_float.py.

string test.test_float.BE_FLOAT_NAN = '\x7f\xc0\x00\x00'

Definition at line 462 of file test_float.py.

tuple test.test_float.format_testfile = os.path.join(test_dir, 'formatfloat_testcases.txt')

Definition at line 22 of file test_float.py.

test.test_float.fromHex = float.fromhex

Definition at line 867 of file test_float.py.

tuple test.test_float.have_getformat = hasattr(float, "__getformat__")

Definition at line 14 of file test_float.py.

tuple test.test_float.INF = float("inf")

Definition at line 11 of file test_float.py.

Definition at line 456 of file test_float.py.

Definition at line 458 of file test_float.py.

Definition at line 461 of file test_float.py.

Definition at line 463 of file test_float.py.

tuple test.test_float.NAN = float("nan")

Definition at line 12 of file test_float.py.

Initial value:
00001 unittest.skipUnless(have_getformat,
00002                                          "requires __getformat__")

Definition at line 15 of file test_float.py.

Initial value:
00001 unittest.skipUnless(hasattr(float, "__setformat__"),
00002                                          "requires __setformat__")

Definition at line 17 of file test_float.py.

tuple test.test_float.test_dir = os.path.dirname(__file__)

Definition at line 21 of file test_float.py.

test.test_float.toHex = float.hex

Definition at line 868 of file test_float.py.