diff options
Diffstat (limited to 'www-misc/buku/files/buku-4.4-fix-tests.patch')
-rw-r--r-- | www-misc/buku/files/buku-4.4-fix-tests.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/www-misc/buku/files/buku-4.4-fix-tests.patch b/www-misc/buku/files/buku-4.4-fix-tests.patch new file mode 100644 index 000000000000..0ef0f25228c3 --- /dev/null +++ b/www-misc/buku/files/buku-4.4-fix-tests.patch @@ -0,0 +1,34 @@ +Upstream: https://github.com/jarun/buku/pull/462/commits/9ecf8857d74f51666ba2ea40344c8ba99accccb8 + +From 9ecf8857d74f51666ba2ea40344c8ba99accccb8 Mon Sep 17 00:00:00 2001 +From: rachmadaniHaryono <foreturiga@gmail.com> +Date: Thu, 6 Aug 2020 14:52:31 +0800 +Subject: [PATCH] fix: test: delete_rec + +--- + tests/test_bukuDb.py | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/tests/test_bukuDb.py b/tests/test_bukuDb.py +index 7e798b3..8b56331 100644 +--- a/tests/test_bukuDb.py ++++ b/tests/test_bukuDb.py +@@ -936,16 +936,14 @@ def test_delete_rec_on_non_interger(index, low, high, is_range): + + for bookmark in TEST_BOOKMARKS: + bdb.add_rec(*bookmark) +- db_len = len(TEST_BOOKMARKS) + + if is_range and not (isinstance(low, int) and isinstance(high, int)): + with pytest.raises(TypeError): + bdb.delete_rec(index=index, low=low, high=high, is_range=is_range) + return + if not is_range and not isinstance(index, int): +- res = bdb.delete_rec(index=index, low=low, high=high, is_range=is_range) +- assert not res +- assert len(bdb.get_rec_all()) == db_len ++ with pytest.raises(TypeError): ++ bdb.delete_rec(index=index, low=low, high=high, is_range=is_range) + else: + assert bdb.delete_rec(index=index, low=low, high=high, is_range=is_range) + |