From a2eeb431cea7a53e1e40d5f299ebb94c9efef25b 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:51:02 +0100 Subject: [PATCH] add unit test --- .circleci/config.yml | 2 +- tests/test_database.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 868edb5..c009a29 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,7 +26,7 @@ jobs: - run: name: Send back coverage results command: | - coverage xml + python -m coverage xml ./cc-test-reporter after-build -t coverage.py -r "221b151c896ec22d8fcb5e522aed25c52e7a9515e59390aa200131b890b718d5" workflows: main: diff --git a/tests/test_database.py b/tests/test_database.py index 4042834..15cb59e 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -13,3 +13,11 @@ class TestDatabase(unittest.TestCase): ser.append(10, b'\x00') ser.append(20, b'\x00') ser.close() + + ser = self.db.get_series('hello-world') + self.assertEqual(ser.last_entry_ts, 20) + ser.close() + + @classmethod + def tearDownClass(cls) -> None: + cls.db.close() -- GitLab