From 6b6e760824674e7ea26aa17053733e7d787ea66a Mon Sep 17 00:00:00 2001 From: Panagiotis Koutsourakis Date: Mon, 3 Jun 2019 12:25:00 +0200 Subject: [PATCH] Add test for bug MonetDB/MonetDBLite-Python#41 --- tests/test_pylite00.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_pylite00.py b/tests/test_pylite00.py index a8a44ca..8ef35b7 100644 --- a/tests/test_pylite00.py +++ b/tests/test_pylite00.py @@ -153,6 +153,13 @@ def test_null_string_insertion_bug(self, initialize_monetdblite): expected = numpy.ma.masked_array(['a', 'a'], mask=[0, 1]) numpy.testing.assert_array_equal(result['s'], expected) + def test_decimal_insertion_bug(self, initialize_monetdblite): + monetdblite.sql("CREATE TABLE pylite13 (d DECIMAL(3, 2))") + monetdblite.insert('pylite13', {'d': [1.3]}) + result = monetdblite.sql("SELECT * FROM pylite13") + expected = numpy.array([1.3]) + numpy.testing.assert_array_equal(result['d'], expected) + # This test must be executed after all others because it # initializes monetdblite independently out of the fixture # initialize_monetdblite