From 7c325e8494a2b767b9fcbd34c792f31b8e2dbf87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Mon, 14 Dec 2020 19:47:45 +0100 Subject: [PATCH] add an unit test --- tests/test_database.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/test_database.py diff --git a/tests/test_database.py b/tests/test_database.py new file mode 100644 index 0000000..4042834 --- /dev/null +++ b/tests/test_database.py @@ -0,0 +1,15 @@ +import unittest + +from tempsdb.database import create_database + + +class TestDatabase(unittest.TestCase): + @classmethod + def setUpClass(cls) -> None: + cls.db = create_database('my_db') + + def test_add_series(self): + ser = self.db.create_series('hello-world', 1, 10) + ser.append(10, b'\x00') + ser.append(20, b'\x00') + ser.close() -- GitLab