test_decimalfraction.py 578 B

12345678910111213141516171819
  1. # -*- coding: utf-8 -*-
  2. # Copyright (c) 2021, Brandon Nielsen
  3. # All rights reserved.
  4. #
  5. # This software may be modified and distributed under the terms
  6. # of the BSD license. See the LICENSE file for details.
  7. import unittest
  8. from aniso8601.decimalfraction import normalize
  9. class TestDecimalFractionFunctions(unittest.TestCase):
  10. def test_normalize(self):
  11. self.assertEqual(normalize(""), "")
  12. self.assertEqual(normalize("12.34"), "12.34")
  13. self.assertEqual(normalize("123,45"), "123.45")
  14. self.assertEqual(normalize("123,45,67"), "123.45.67")