diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2017-03-24 19:28:43 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-24 19:28:43 (GMT) |
| commit | 671079ef6063fe227460a6c3114625fb6282bbd0 (patch) | |
| tree | 1b43f7ca1513741277932d064bcd9367dff88443 /Lib/test/test_getargs2.py | |
| parent | af7b9ec5c855366feef4c67dc492d64b3baf84ca (diff) | |
| download | cpython-671079ef6063fe227460a6c3114625fb6282bbd0.zip cpython-671079ef6063fe227460a6c3114625fb6282bbd0.tar.gz cpython-671079ef6063fe227460a6c3114625fb6282bbd0.tar.bz2 | |
bpo-29894: Deprecate returning an instance of complex subclass from __complex__. (#798)
In a future versions of Python this can be an error.
Diffstat (limited to 'Lib/test/test_getargs2.py')
| -rw-r--r-- | Lib/test/test_getargs2.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_getargs2.py b/Lib/test/test_getargs2.py index 8a194aa..e5d9aa6 100644 --- a/Lib/test/test_getargs2.py +++ b/Lib/test/test_getargs2.py @@ -408,7 +408,8 @@ class Float_TestCase(unittest.TestCase): self.assertEqual(getargs_D(ComplexSubclass(7.5+0.25j)), 7.5+0.25j) self.assertEqual(getargs_D(ComplexSubclass2(7.5+0.25j)), 7.5+0.25j) self.assertRaises(TypeError, getargs_D, BadComplex()) - self.assertEqual(getargs_D(BadComplex2()), 4.25+0.5j) + with self.assertWarns(DeprecationWarning): + self.assertEqual(getargs_D(BadComplex2()), 4.25+0.5j) self.assertEqual(getargs_D(BadComplex3(7.5+0.25j)), 7.5+0.25j) for x in (DBL_MIN, -DBL_MIN, DBL_MAX, -DBL_MAX, INF, -INF): |
