Skip to content

Commit 5105ce2

Browse files
committed
+ skip builtin doctests
1 parent 57f4824 commit 5105ce2

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

Lib/test/test_builtin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2991,7 +2991,8 @@ def test_namespace_order(self):
29912991

29922992
def load_tests(loader, tests, pattern):
29932993
from doctest import DocTestSuite
2994-
tests.addTest(DocTestSuite(builtins))
2994+
if getattr(sys, 'float_repr_style', '') == 'short':
2995+
tests.addTest(DocTestSuite(builtins))
29952996
return tests
29962997

29972998
if __name__ == "__main__":

Objects/clinic/floatobject.c.h

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Objects/floatobject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,13 +1238,13 @@ Create a floating-point number from a hexadecimal string.
12381238
12391239
>>> float.fromhex('0x1.ffffp10')
12401240
2047.984375
1241-
>>> float.fromhex('0x1.21p-1034')
1242-
6.132567835889637e-312
1241+
>>> float.fromhex('-0x1p-1074')
1242+
-5e-324
12431243
[clinic start generated code]*/
12441244

12451245
static PyObject *
12461246
float_fromhex_impl(PyTypeObject *type, PyObject *string)
1247-
/*[clinic end generated code: output=c54b4923552e5af5 input=d75b777b5766774a]*/
1247+
/*[clinic end generated code: output=c54b4923552e5af5 input=0407bebd354bca89]*/
12481248
{
12491249
PyObject *result;
12501250
double x;

0 commit comments

Comments
 (0)