~ubuntu-branches/ubuntu/karmic/python3.0/karmic

« back to all changes in this revision

Viewing changes to Lib/test/test_cmath.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-02-16 17:18:23 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090216171823-1d5cm5qnnjvmnzzm
Tags: 3.0.1-0ubuntu1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
182
182
            pass
183
183
        class MyInt(object):
184
184
            def __int__(self): return 2
185
 
            def __long__(self): return 2
186
185
            def __index__(self): return 2
187
186
        class MyIntOS:
188
187
            def __int__(self): return 2
189
 
            def __long__(self): return 2
190
188
            def __index__(self): return 2
191
189
 
192
190
        # other possible combinations of __float__ and __complex__
219
217
            self.assertEqual(f(JustFloatOS()), f(flt_arg))
220
218
            # TypeError should be raised for classes not providing
221
219
            # either __complex__ or __float__, even if they provide
222
 
            # __int__, __long__ or __index__.  An old-style class
 
220
            # __int__ or __index__.  An old-style class
223
221
            # currently raises AttributeError instead of a TypeError;
224
222
            # this could be considered a bug.
225
223
            self.assertRaises(TypeError, f, NeitherComplexNorFloat())