diff options
Diffstat (limited to 'sources/shiboken6/tests/samplebinding/stdcomplex_test.py')
| -rw-r--r-- | sources/shiboken6/tests/samplebinding/stdcomplex_test.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/samplebinding/stdcomplex_test.py b/sources/shiboken6/tests/samplebinding/stdcomplex_test.py index 539463508..0caa9764d 100644 --- a/sources/shiboken6/tests/samplebinding/stdcomplex_test.py +++ b/sources/shiboken6/tests/samplebinding/stdcomplex_test.py @@ -25,6 +25,11 @@ class StdComplexTest(unittest.TestCase): '''Test case for StdComplex class, exercising esoteric number protocols (Py_nb_). For standard number protocols, see Point.''' + def testConversion(self): + pt = StdComplex(REAL, IMAG) + self.assertEqual(int(pt), int(round(pt.abs_value()))) + self.assertEqual(float(pt), pt.abs_value()) + def testAbs(self): pt = StdComplex(REAL, IMAG) self.assertEqual(abs(pt), pt.abs_value()) |
