Skip to content

Commit 7a1434f

Browse files
committed
Failing test for f64 precision
1 parent ec747e8 commit 7a1434f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/test_type.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import unittest
55
import datetime
66

7+
import pytest
78
import orjson
89

910

@@ -181,6 +182,14 @@ def test_float(self):
181182
self.assertEqual(1.893, orjson.loads("1.893"))
182183
self.assertEqual(1.3, orjson.loads("1.3"))
183184

185+
@pytest.mark.xfail
186+
def test_float_precision(self):
187+
"""
188+
float precision
189+
"""
190+
self.assertEqual(orjson.loads("31.245270191439438"), 31.245270191439438)
191+
self.assertEqual(orjson.loads("121.48791951161945"), 121.48791951161945)
192+
184193
def test_float_notation(self):
185194
"""
186195
float notation

0 commit comments

Comments
 (0)