mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Redid the commit cause I messed up
This commit is contained in:
1 parent
3a0c2bb752
commit
a07d3432c1
2 files changed
+3
-5
No files matched your search
Vendored
-4
@@ -1024,8 +1024,6 @@ class InfNanTest(unittest.TestCase):
|
||||
self.assertEqual(str(1e300 * 1e300), "inf")
|
||||
self.assertEqual(str(-1e300 * 1e300), "-inf")
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_nan_from_str(self):
|
||||
self.assertTrue(isnan(float("nan")))
|
||||
self.assertTrue(isnan(float("+nan")))
|
||||
@@ -1055,8 +1053,6 @@ class InfNanTest(unittest.TestCase):
|
||||
self.assertRaises(ValueError, float, "+-NaN")
|
||||
self.assertRaises(ValueError, float, "--nAn")
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_nan_as_str(self):
|
||||
self.assertEqual(repr(1e300 * 1e300 * 0), "nan")
|
||||
self.assertEqual(repr(-1e300 * 1e300 * 0), "nan")
|
||||
|
||||
@@ -226,7 +226,9 @@ pub fn to_string(value: f64) -> String {
|
||||
format!("{}e{:+#03}", significand, exponent)
|
||||
}
|
||||
} else {
|
||||
value.to_string()
|
||||
let mut s = value.to_string();
|
||||
s.make_ascii_lowercase();
|
||||
s
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user