summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_complex.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed complex.__getnewargs__() to not emit another complex object.Alexandre Vassalotti2008-06-041-0/+8
|
* Fixed repr() and str() of complex numbers. Complex suffered from the same ↵Christian Heimes2008-02-151-0/+14
| | | | problem as floats but I forgot to test and fix them.
* Issue #1678380. Fix a bug that identifies 0j and -0j when they appearMark Dickinson2008-01-311-0/+7
| | | | | in the same code unit. The fix is essentially the same as the fix for a previous bug identifying 0. and -0.
* Patch # 1507 by Mark Dickinson. Make complex(x, -0) retain the sign ofGuido van Rossum2007-11-271-0/+13
| | | | | the imaginary part (as long as it's not complex). Backport candidate?
* Patch #1491866: change the complex() constructor to allow parthensized ↵Collin Winter2007-03-091-0/+12
| | | | forms. This means complex(repr(x)) now works instead of raising a ValueError.
* Test case for latest complexobject fix.Georg Brandl2005-09-171-0/+2
|
* Make subclasses of int, long, complex, float, and unicode perform typeBrett Cannon2005-04-261-0/+22
| | | | | | | conversion using the proper magic slot (e.g., __int__()). Also move conversion code out of PyNumber_*() functions in the C API into the nb_* function. Applied patch #1109424. Thanks Walter Doewald.
* Fix repr for negative imaginary part. Fixes #1013908.Martin v. Löwis2004-08-221-0/+1
|
* Remove useless import.Walter Dörwald2003-08-051-1/+1
|
* Check both __div__ and __truediv__ in division tests.Walter Dörwald2003-08-051-1/+9
| | | | (From SF patch #543867)
* Add various test cases from SF patch 543867.Walter Dörwald2003-07-151-1/+58
|
* Whitespace normalization.Tim Peters2003-06-291-1/+1
|
* Port test_complex.py to unittest.Walter Dörwald2003-06-181-89/+249
| | | | | | | | Move the constructor tests from test_builtin to test_complex. Add a bunch of tests (code coverage is a 94%). From SF patch #736962.
* Complete the absolute import patch for the test suite. All relativeBarry Warsaw2002-07-301-1/+1
| | | | | | | | imports of test modules now import from the test package. Other related oddities are also fixed (like DeprecationWarning filters that weren't specifying the full import part, etc.). Also did a general code cleanup to remove all "from test.test_support import *"'s. Other from...import *'s weren't changed.
* test_support: add a docstring to vereq().Tim Peters2001-12-291-2/+1
| | | | test_complex: repair new test's usage of vereq().
* SF Patch #497487 add test to compare conjugate of a complex numberNeal Norwitz2001-12-291-1/+4
|
* SF Patch #494873 add tests for complex numbers including calls to int()/long()Neal Norwitz2001-12-291-0/+21
|
* Add a comment explaining what these tests are for, and where to look forFred Drake2001-12-131-0/+3
| | | | tests of complex().
* Reverting to rev 1.2. Apparently gcc doesn't use the extended-precisionTim Peters2001-09-061-3/+16
| | | | | | | | capabilities of the Pentium FPU, so what should have been (and were on Windows) exact results got fuzzy. Then it turns out test_support.fcmp() isn't tolerant of tiny errors when *one* of the comparands is 0, but test_complex's old check_close_real() is. Rather than fix gcc <wink>, easier to revert this test and revisit after the release.
* Rewrite to use test_support's fine fcmp instead -- I didn't know thatTim Peters2001-09-061-16/+3
| | | | existed when I wrote this test.
* This division test was too stringent in its accuracy expectations forTim Peters2001-05-291-4/+4
| | | | | | | random inputs: if you ran the test 100 times, you could expect it to report a bogus failure. So loosened its expectations. Also changed the way failing tests are printed, so that when run under regrtest.py we get enough info to reproduce the failure.
* SF bug [ #409448 ] Complex division is braindeadTim Peters2001-03-181-0/+65
http://sourceforge.net/tracker/?func=detail&aid=409448&group_id=5470&atid=105470 Now less braindead. Also added test_complex.py, which doesn't test much, but fails without this patch.