Skip to content

Commit

Permalink
Merge 40bf97f into 2d4c06c
Browse files Browse the repository at this point in the history
  • Loading branch information
madig committed Aug 24, 2023
2 parents 2d4c06c + 40bf97f commit b6f279d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

steps:
- name: Log reason (manual run only)
Expand Down
2 changes: 1 addition & 1 deletion src/ufonormalizer/__init__.py
Expand Up @@ -1417,7 +1417,7 @@ def xmlConvertFloat(value):
if "." in string:
string = string.rstrip("0")
if string[-1] == ".":
return xmlConvertInt(int(value))
return xmlConvertInt(int(string[:-1]))
return string


Expand Down
1 change: 1 addition & 0 deletions tests/test_ufonormalizer.py
Expand Up @@ -1813,6 +1813,7 @@ def test_xmlConvertFloat(self):
self.assertEqual(xmlConvertFloat(1.0000000001), '1.0000000001')
self.assertEqual(xmlConvertFloat(1.00000000001), '1')
self.assertEqual(xmlConvertFloat(1.00000000009), '1.0000000001')
self.assertEqual(xmlConvertFloat(0.9999999999999999), '1')

def test_xmlConvertFloat_no_rounding(self):
import ufonormalizer
Expand Down

0 comments on commit b6f279d

Please sign in to comment.