Skip to content

Commit

Permalink
Don't use locale... It's not supported in GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
leifgehrmann committed Oct 21, 2023
1 parent 935a7f2 commit feba606
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/acceptance/test_tab_array.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import pangocffi
from pangocffi import Layout, TabArray, TabAlign
from tests.context_creator import ContextCreator
import locale


def test_tab_array_decimal_places():
Expand Down Expand Up @@ -38,14 +37,11 @@ def test_tab_array_decimal_places():
['Erfurt', 269.2],
]

locale.setlocale(locale.LC_ALL, 'de_DE')

text = '\t<span font_weight="bold">Name</span>' \
'\t<span font_weight="bold"> Fläche (km²)</span>\n'
for line in lines:
text += "\t" + line[0]
text += "\t" + locale.format_string("%f", line[1])\
.rstrip('0').rstrip(',')
text += "\t" + '{:.4f}'.format(line[1]).replace('.', ',').rstrip('0')
text += '\n'

# Using pangocairocffi, this would be `pangocairocffi.create_layout()` with
Expand Down

0 comments on commit feba606

Please sign in to comment.