~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Lib/test/test_cmath.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
    def test_constants(self):
131
131
        e_expected = 2.71828182845904523536
132
132
        pi_expected = 3.14159265358979323846
133
 
        self.rAssertAlmostEqual(cmath.pi, pi_expected, 9,
134
 
            "cmath.pi is %s; should be %s" % (cmath.pi, pi_expected))
135
 
        self.rAssertAlmostEqual(cmath.e,  e_expected, 9,
136
 
            "cmath.e is %s; should be %s" % (cmath.e, e_expected))
 
133
        self.assertAlmostEqual(cmath.pi, pi_expected, places=9,
 
134
            msg="cmath.pi is %s; should be %s" % (cmath.pi, pi_expected))
 
135
        self.assertAlmostEqual(cmath.e, e_expected, places=9,
 
136
            msg="cmath.e is %s; should be %s" % (cmath.e, e_expected))
137
137
 
138
138
    def test_user_object(self):
139
139
        # Test automatic calling of __complex__ and __float__ by cmath