| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
* bpo-29602: fix signed zero handling in complex constructor
* Add missing have_getformat definition; remove use of unittest subtests.
|
|
|
|
| |
number by (nan+0j).
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line
#9424: Replace deprecated assert* methods in the Python test suite.
........
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83400 | mark.dickinson | 2010-08-01 11:41:49 +0100 (Sun, 01 Aug 2010) | 7 lines
Issue #9416: Fix some issues with complex formatting where the
output with no type specifier failed to match the str output:
- format(complex(-0.0, 2.0), '-') omitted the real part from the output,
- format(complex(0.0, 2.0), '-') included a sign and parentheses.
........
|
|
|
|
| |
and a complex instance. Based on a patch by Meador Inge.
|
|
|
|
|
| |
type. Coercion for arithmetic operations was already removed in
r78280, but that commit didn't remove coercion for rich comparisons.
|
|
|
|
| |
assertRaises context manager to simplify some tests.
|
|
|
|
| |
complex.__format__. Now it matches other numeric types.
|
|
|
|
| |
complex.__coerce__. Thanks Meador Inge for the patch.
|
| |
|
|
|
|
| |
case. Much of the patch came from Mark Dickinson.
|
|
|
|
|
| |
complexobject.c. Also remove length restriction on unicode inputs to
the complex constructor.
|
| |
|
|
|
|
| |
r72803.
|
|
|
|
| |
precision of 12 when using the empty presentation type. This more closely matches str()'s behavior and reduces surprises when adding alignment flags to an empty format string. Patch by Mark Dickinson.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- simplify parsing and printing of complex numbers
- make complex(repr(z)) round-tripping work for complex
numbers involving nans, infs, or negative zeros
- don't accept some of the stranger complex strings
that were previously allowed---e.g., complex('1..1j')
|
| |
|
|
|
|
| |
problem as floats but I forgot to test and fix them.
|
|
|
|
|
| |
in the same code unit. The fix is essentially the same as the fix for a
previous bug identifying 0. and -0.
|
|
|
|
|
| |
the imaginary part (as long as it's not complex).
Backport candidate?
|
|
|
|
| |
forms. This means complex(repr(x)) now works instead of raising a ValueError.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
(From SF patch #543867)
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Move the constructor tests from test_builtin to test_complex.
Add a bunch of tests (code coverage is a 94%).
From SF patch #736962.
|
|
|
|
|
|
|
|
| |
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_complex: repair new test's usage of vereq().
|
| |
|
| |
|
|
|
|
| |
tests of complex().
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
existed when I wrote this test.
|
|
|
|
|
|
|
| |
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.
|
|
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.
|