Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
test.test_float.UnknownFormatTestCase Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def test_double_specials_dont_unpack
def test_float_specials_dont_unpack

Public Attributes


Detailed Description

Definition at line 469 of file

Member Function Documentation

Definition at line 470 of file

00471     def setUp(self):
00472         self.save_formats = {'double':float.__getformat__('double'),
00473                              'float':float.__getformat__('float')}
00474         float.__setformat__('double', 'unknown')
00475         float.__setformat__('float', 'unknown')

Here is the caller graph for this function:

Definition at line 476 of file

00477     def tearDown(self):
00478         float.__setformat__('double', self.save_formats['double'])
00479         float.__setformat__('float', self.save_formats['float'])

Here is the caller graph for this function:

Definition at line 480 of file

00481     def test_double_specials_dont_unpack(self):
00482         for fmt, data in [('>d', BE_DOUBLE_INF),
00483                           ('>d', BE_DOUBLE_NAN),
00484                           ('<d', LE_DOUBLE_INF),
00485                           ('<d', LE_DOUBLE_NAN)]:
00486             self.assertRaises(ValueError, struct.unpack, fmt, data)

Here is the call graph for this function:

Definition at line 487 of file

00488     def test_float_specials_dont_unpack(self):
00489         for fmt, data in [('>f', BE_FLOAT_INF),
00490                           ('>f', BE_FLOAT_NAN),
00491                           ('<f', LE_FLOAT_INF),
00492                           ('<f', LE_FLOAT_NAN)]:
00493             self.assertRaises(ValueError, struct.unpack, fmt, data)
00496 # on an IEEE platform, all we guarantee is that bit patterns
00497 # representing infinities or NaNs do not raise an exception; all else
00498 # is accident (today).
00499 # let's also try to guarantee that -0.0 and 0.0 don't get confused.

Here is the call graph for this function:

Member Data Documentation

Definition at line 471 of file

The documentation for this class was generated from the following file: