From a8d66282c457796e9883e5b3a1280df639a093ed Mon Sep 17 00:00:00 2001 From: poikjhn Date: Wed, 1 Jun 2016 00:06:17 +0200 Subject: [PATCH] minor changes --- .gitignore | 2 ++ tests/test_bukuDb.py | 61 +++++++++++++++++++++++++------------------- 2 files changed, 37 insertions(+), 26 deletions(-) create mode 100644 .gitignore mode change 100644 => 100755 tests/test_bukuDb.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..27c8f86 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.py[co] +*.sw[po] diff --git a/tests/test_bukuDb.py b/tests/test_bukuDb.py old mode 100644 new mode 100755 index 3b6f525..61dfd54 --- a/tests/test_bukuDb.py +++ b/tests/test_bukuDb.py @@ -1,9 +1,10 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- from genericpath import exists import imp import os from tempfile import TemporaryDirectory -from unittest import TestCase +import unittest from os.path import join, expanduser import sqlite3 @@ -17,7 +18,7 @@ TEST_TEMP_DBFILE_PATH = join(TEST_TEMP_DBDIR_PATH, 'bookmarks.db') from buku import BukuDb, parse_tags -class TestBukuDb(TestCase): +class TestBukuDb(unittest.TestCase): def setUp(self): os.environ['XDG_DATA_HOME'] = TEST_TEMP_DIR_PATH @@ -25,6 +26,7 @@ class TestBukuDb(TestCase): def tearDown(self): os.environ['XDG_DATA_HOME'] = TEST_TEMP_DIR_PATH + # @unittest.skip('skipping') def test_get_dbdir_path(self): dbdir_expected = TEST_TEMP_DBDIR_PATH dbdir_local_expected = join(expanduser('~'), '.local', 'share', 'buku') @@ -55,6 +57,7 @@ class TestBukuDb(TestCase): # def test_move_legacy_dbfile(self): # self.fail() + # @unittest.skip('skipping') def test_initdb(self): if exists(TEST_TEMP_DBFILE_PATH): os.remove(TEST_TEMP_DBFILE_PATH) @@ -67,6 +70,7 @@ class TestBukuDb(TestCase): conn.close() + # @unittest.skip('skipping') def test_add_and_retrieve_bookmark(self): URL = 'http://slashdot.org' TITLE = 'SLASHDOT' @@ -89,38 +93,43 @@ class TestBukuDb(TestCase): # TODO: retrieve and compare # TODO: tags should be passed to the api as a sequence... - def test_update_bookmark(self): - self.fail() + # @unittest.skip('skipping') + # def test_update_bookmark(self): + # self.fail() - def test_refreshdb(self): - self.fail() + # def test_refreshdb(self): + # self.fail() - def test_searchdb(self): - self.fail() + # def test_searchdb(self): + # self.fail() - def test_search_by_tag(self): - self.fail() + # def test_search_by_tag(self): + # self.fail() - def test_compactdb(self): - self.fail() + # def test_compactdb(self): + # self.fail() - def test_delete_bookmark(self): - self.fail() + # def test_delete_bookmark(self): + # self.fail() - def test_print_bookmark(self): - self.fail() + # def test_print_bookmark(self): + # self.fail() - def test_list_tags(self): - self.fail() + # def test_list_tags(self): + # self.fail() - def test_replace_tag(self): - self.fail() + # def test_replace_tag(self): + # self.fail() - def test_browse_by_index(self): - self.fail() + # def test_browse_by_index(self): + # self.fail() - def test_close_quit(self): - self.fail() + # def test_close_quit(self): + # self.fail() - def test_import_bookmark(self): - self.fail() \ No newline at end of file + # def test_import_bookmark(self): + # self.fail() + + +if __name__ == "__main__": + unittest.main()