diff --git a/pyexcel-ods.yml b/pyexcel-ods.yml index e7bc035..c8201fd 100644 --- a/pyexcel-ods.yml +++ b/pyexcel-ods.yml @@ -1,11 +1,11 @@ overrides: "pyexcel.yaml" name: "pyexcel-ods" nick_name: ods -version: 0.5.3 -current_version: 0.5.3 +version: 0.5.4 +current_version: 0.5.4 release: 0.5.3 file_type: ods dependencies: - - pyexcel-io>=0.5.3 + - pyexcel-io>=0.5.9 - odfpy==1.3.5 description: A wrapper library to read, manipulate and write data in ods format diff --git a/tests/test_bug_fixes.py b/tests/test_bug_fixes.py index cedfe3d..a99b9cc 100644 --- a/tests/test_bug_fixes.py +++ b/tests/test_bug_fixes.py @@ -4,6 +4,7 @@ import os import psutil import pyexcel as pe from pyexcel_ods import get_data, save_data +from pyexcel_io.exceptions import IntegerAccuracyLossError from nose.tools import raises, eq_ from nose import SkipTest @@ -125,7 +126,7 @@ def test_pr_22(): def test_issue_23(): if not IN_TRAVIS: raise SkipTest() - pe.get_book(url="https://github.com/pyexcel/pyexcel-ods/raw/master/tests/fixtures/white_space.ods"); # flake8: noqa + pe.get_book(url="https://github.com/pyexcel/pyexcel-ods/raw/master/tests/fixtures/white_space.ods") # noqa: E501 def test_issue_24(): @@ -140,5 +141,23 @@ def test_issue_27(): eq_(data['VGPMX'], [['', 'Cost Basis', '0']]) +def test_issue_30(): + test_file = "issue_30.ods" + sheet = pe.Sheet() + sheet[0, 0] = 999999999999999 + sheet.save_as(test_file) + sheet2 = pe.get_sheet(file_name=test_file) + eq_(sheet[0, 0], sheet2[0, 0]) + os.unlink(test_file) + + +@raises(IntegerAccuracyLossError) +def test_issue_30_precision_loss(): + test_file = "issue_30_2.ods" + sheet = pe.Sheet() + sheet[0, 0] = 9999999999999999 + sheet.save_as(test_file) + + def get_fixtures(filename): return os.path.join("tests", "fixtures", filename)