From 5642afaaf2c735aa8835bfdaf7b29d7cee53ebfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Fri, 9 Jul 2021 21:43:37 +0200 Subject: [PATCH] extra tests --- tests/test_series.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/test_series.py b/tests/test_series.py index 658e75a..6270512 100644 --- a/tests/test_series.py +++ b/tests/test_series.py @@ -8,6 +8,19 @@ from tempsdb.exceptions import Corruption class TestSeries(unittest.TestCase): + def test_empty(self): + """ + Test trimming after writing without closing the series. + + Also tests out close_chunks and open_chunks_mmap_size + """ + from tempsdb.series import create_series + series = create_series('test18', 'test18', 10, 4096) + try: + self.assertRaises(ValueError, series.get_current_value) + finally: + series.close() + def test_trim_multiple_chunks_wo_close(self): """ Test trimming after writing without closing the series. -- GitLab