UPDATE: Adds bindings to update timezone and locale
UPDATE: Update "generate locale" utility FIX: Minor fixes to UI and proper support for locales/timezones UPDATE: Adds "display language" setting to core
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import ironcalc as ic
|
||||
|
||||
def test_simple():
|
||||
model = ic.create("model", "en", "UTC")
|
||||
model = ic.create("model", "en", "UTC", "en")
|
||||
model.set_user_input(0, 1, 1, "=1+2")
|
||||
model.evaluate()
|
||||
|
||||
@@ -9,12 +9,12 @@ def test_simple():
|
||||
|
||||
bytes = model.to_bytes()
|
||||
|
||||
model2 = ic.load_from_bytes(bytes)
|
||||
model2 = ic.load_from_bytes(bytes, "en")
|
||||
assert model2.get_formatted_cell_value(0, 1, 1) == "3"
|
||||
|
||||
|
||||
def test_simple_user():
|
||||
model = ic.create_user_model("model", "en", "UTC")
|
||||
model = ic.create_user_model("model", "en", "UTC", "en")
|
||||
model.set_user_input(0, 1, 1, "=1+2")
|
||||
model.set_user_input(0, 1, 2, "=A1+3")
|
||||
|
||||
@@ -23,7 +23,7 @@ def test_simple_user():
|
||||
|
||||
diffs = model.flush_send_queue()
|
||||
|
||||
model2 = ic.create_user_model("model", "en", "UTC")
|
||||
model2 = ic.create_user_model("model", "en", "UTC", "en")
|
||||
model2.apply_external_diffs(diffs)
|
||||
assert model2.get_formatted_cell_value(0, 1, 1) == "3"
|
||||
assert model2.get_formatted_cell_value(0, 1, 2) == "6"
|
||||
@@ -31,7 +31,7 @@ def test_simple_user():
|
||||
|
||||
def test_sheet_dimensions():
|
||||
# Test with empty sheet
|
||||
model = ic.create("model", "en", "UTC")
|
||||
model = ic.create("model", "en", "UTC", "en")
|
||||
min_row, max_row, min_col, max_col = model.get_sheet_dimensions(0)
|
||||
assert (min_row, max_row, min_col, max_col) == (1, 1, 1, 1)
|
||||
|
||||
@@ -47,7 +47,7 @@ def test_sheet_dimensions():
|
||||
|
||||
def test_sheet_dimensions_user_model():
|
||||
# Test with user model API as well
|
||||
model = ic.create_user_model("model", "en", "UTC")
|
||||
model = ic.create_user_model("model", "en", "UTC", "en")
|
||||
|
||||
# Add a single cell
|
||||
model.set_user_input(0, 2, 3, "Test")
|
||||
|
||||
Reference in New Issue
Block a user