Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
c105c1b8
Commit
c105c1b8
authored
Sep 25, 2022
by
ento
Committed by
Jason Madden
Oct 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch regression test to use sys.float_info
This one is available in older versions of Python
parent
0fc65d60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/gevent/tests/test__issue1864.py
src/gevent/tests/test__issue1864.py
+5
-5
No files found.
src/gevent/tests/test__issue1864.py
View file @
c105c1b8
import
math
import
sys
import
unittest
from
gevent.testing
import
PY39
class
TestSubnormalFloatsAreNotDisabled
(
unittest
.
TestCase
):
"""
...
...
@@ -10,11 +8,13 @@ class TestSubnormalFloatsAreNotDisabled(unittest.TestCase):
disabled the moment when gevent was imported. This impacted libraries
that expect subnormal floats to be enabled.
"""
@
unittest
.
skipUnless
(
PY39
,
"Need math.nextafter()"
)
def
test_subnormal_is_not_zero
(
self
):
import
gevent
assert
math
.
nextafter
(
0
,
1
)
!=
0
# `sys.float_info.min` is the minimum representable positive normalized
# float, so dividing it by two gives us a positive subnormal float,
# as long as subnormals floats are not disabled.
assert
(
sys
.
float_info
.
min
/
2
)
>
0
if
__name__
==
"__main__"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment