mirror of
https://github.com/beetbox/beets.git
synced 2025-12-30 20:42:37 +01:00
Add safe_cast tests for . and 1.0.0
This commit is contained in:
parent
18aef27402
commit
5963595f32
1 changed files with 8 additions and 0 deletions
|
|
@ -132,6 +132,14 @@ class InvalidValueToleranceTest(unittest.TestCase):
|
|||
v = _sc(float, u'+')
|
||||
self.assertEqual(v, 0.0)
|
||||
|
||||
def test_safe_cast_float_with_dot_only(self):
|
||||
v = _sc(float, u'.')
|
||||
self.assertEqual(v, 0.0)
|
||||
|
||||
def test_safe_cast_float_with_multiple_dots(self):
|
||||
v = _sc(float, u'1.0.0')
|
||||
self.assertEqual(v, 1.0)
|
||||
|
||||
|
||||
class SafetyTest(unittest.TestCase, TestHelper):
|
||||
def setUp(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue