Commit Graph

99 Commits

Author SHA1 Message Date
rachmadaniHaryono
b51ef69c5e chg: test: use url zip for firefox bm load 2018-10-30 10:21:21 +08:00
rachmadaniHaryono
1713b8372d chg: test: shorten time for test_browse_by_index 2018-10-30 10:21:21 +08:00
rachmadaniHaryono
cf3e68e3ca fix: test: using example.com 2018-10-30 10:19:54 +08:00
rachmadaniHaryono
41cf1d2223 fix: test: test_search_by_multiple_tags_search_any 2018-10-30 10:19:53 +08:00
rachmadaniHaryono
99cc6332ed fix: test: test_bukudb flake8 error 2018-10-30 10:19:53 +08:00
rachmadaniHaryono
95547f85a6 chg: test: update test on browser bm load
- use local test file
- comment line on dumping the data
- print info when dumping the data
2018-10-30 10:18:41 +08:00
rachmadaniHaryono
ac55d322a4 chg: test: shorten time for 5 longest test
- also use example.com instead of test.com
2018-10-30 10:18:40 +08:00
Arun Prakash Jana
a9afc78f7e
Jump to prompt if no args 2018-09-02 12:07:09 +05:30
Arun Prakash Jana
77894f830e
Skip test_print_rec_hypothesis() 2018-08-30 05:57:50 +05:30
rachmadaniHaryono
9d2b414384 fix: test: test_add_rec_add_invalid_url 2018-08-06 15:47:38 +08:00
rachmadaniHaryono
c0af32544a chg: test: use http for example.com 2018-08-06 14:37:28 +08:00
Arun Prakash Jana
f5782a6257
Add refreshdb test 2018-08-01 10:08:14 +05:30
Arun Prakash Jana
60a12a8362
Skip refreshdb test 2018-08-01 10:00:24 +05:30
rachmadaniHaryono
d74190ee92 chg: test: refreshdb 2018-07-31 19:01:18 +08:00
rachmadaniHaryono
b476b40151 fix: text: travis 2018-07-31 15:32:43 +08:00
rachmadaniHaryono
57aec20406 chg: test: add info when test failed 2018-07-31 15:08:19 +08:00
Arun Prakash Jana
de7a6993e0
Fix build break 2018-07-19 02:27:15 +05:30
rachmadani haryono
c3d38cb17b Feature/pytest (#288)
* chg: test: pytest

* chg: test: required package attrs

* fix: test: regex input

* chg: test: remove unused conftest

* chg: test: verbose on testing refreshdb

* chg: dev: sort required package

* Revert "chg: test: verbose on testing refreshdb"

This reverts commit f391b36ba4b729a67b744330d226a84b48655a7d.
2018-06-22 10:41:36 +05:30
rachmadaniHaryono
0e9ebcc464 chg: test: remove unused zip link 2018-05-04 23:23:09 -07:00
rachmadaniHaryono
738afa36a6 chg: test: remove unused pickle lib 2018-05-04 23:23:09 -07:00
rachmadaniHaryono
f50bdd13f8 chg: test: browser test
- add method to dump new exp_res
- use local file
2018-05-04 23:23:09 -07:00
SaltyCatFish
e12d2f95f0 Support keyword filtering (records having keywords a and b but not c and d) (#256)
* Support keyword filtering (records having keywords a and b but not c and d)

* Remove debug statements.

* Left a pass statement by mistake.

* Update cli help to show word list '[...]' after search options.

* Add space after method doc.

* Change cli option '-W --without' to '-x --exclude'
2018-03-25 23:10:06 +05:30
rachmadani haryono
5c728030aa test for search_keywords_and_filter_by_tags method (#254)
* new: test: search_keywords_and_filter_by_tags

* fix: test: set pytest version
2018-03-23 08:49:19 +05:30
Arun Prakash Jana
f804233ef9
Sanitize PR #252 2018-03-23 05:10:48 +05:30
SaltyCatFish
6db194405b Add search_and_filter (#252)
* Add search_and_filter

* Update search_any_keyword_and_filter_by_tags and tests.
2018-03-23 04:15:20 +05:30
Alex
c2d21b8c24 Feature/order search results by keyword matches (#244)
* Add case statements to search_by_tag

* Add subselect so we don't return score column

* update tests to change expected order of results

* Add case statements to searchdb

* Add docstring to wrap_in_case_statement

* Add to comment in search_by_multiple_tags_search_any test

* Switch clause to fragment

* Change case_select variable to case_statement

* Remove wrap_in_case_statement function and use lambda instead
2018-02-18 06:52:59 +05:30
rachmadani haryono
19e8fff33d Feature/test copy url to clipboard support (#243)
* chg: dev: move new feature to its own function

* chg: test: test copy_to_clipboard func

* chg: test: remove pytest-catchlog

* chg: test: minimum pytest version

* chg: test: add exception on python 3.5&3.6 tests
2018-02-11 21:27:33 +05:30
rachmadani haryono
88105878e4 chg: test: add exception on python3.4 tests (#242) 2018-02-04 21:38:59 +05:30
Arun Prakash Jana
4e93f235f6
Fix urllib.request import 2017-12-02 22:02:20 +05:30
Arun Prakash Jana
b7a1b3b8b5
Retire Python 3.3 support, reached EOL
Ref: https://www.python.org/downloads/release/python-337/
2017-12-02 21:53:20 +05:30
Alex
2d037d00d7 Use set operations in suggest_similar_tag method; add tests (#230)
* Use set operations in suggest_similar_tag method; add tests

* remove extra blank line
2017-11-06 08:19:10 +05:30
Arun Prakash Jana
d9be8e17f4
Add test case to shorten and expand url 2017-10-23 19:28:18 +05:30
Arun Prakash Jana
01e3b005b4 edit_update_rec(): id=-1 is valid now, use -2 2017-10-09 01:33:47 +05:30
rachmadani haryono
7719f480b1 test browser database load (#215)
* new: test: add chrome json test

* chg: test: remove unused json

* chg: dev: use gh uploaded file

* chg: test: parametrize the test

* new: test: chrome no parent tag pickle result file

* new: test: load firefox db test

* chg: test: merge same method on fixture

* fix: dev: false variable name

* chg: test: move zip extractor to its own method

* chg: test: use external zip file for exp result

* fix: test: flake8 fix

* fix: test: use strpath from folder

* fix: test: firefox nopt expected result

* chg: test: remove test data file from repo
2017-09-21 20:45:18 +05:30
Alex
2b7f142245 Feature/search multiple tags (#187)
* Implement feature "Search multiple tags, exclusion in tag search"

Add failing test for searching any multiple set of tags

Search any tags works; passing tests

Add failing test for searching all multiple tags

Search all tags works

Do not allow combination of search logics

Adds support for tag exclusion search

Update Search Options Group

Update README

Clean up

Fix man/readme language

Fix search_by_tag docstring

Split tags by ' - ' not '-': allows for hyphenation

Remove unnecessary else

Change search_logic lang to search_operator

Update exclusion language in readme and man

Print warning if ',' and '+' are both used in a search

* Add documentation and examples to manpage, improve documentation in README and buku.py

* Enforce space separation of '+' and document

* Fix under-indent in tests that causes build failure

* Add test to check that search_by_tag constructs correct sqlite query; also remove unittest.skips from search_by_tag tests

* Move tag search preparation work into prep_tag_search helper function; add test to test_buku.py

* Use pytest.mark.parametrize for test_prep_tag_search
2017-08-15 02:37:01 +05:30
rachmadani haryono
d91ce68aba new: test: python3.6 on travis (#170)
* new: test: python3.6 on travis

* chg: dev: change deploy python version

* chg: dev: change skip message
2017-07-12 22:23:38 +05:30
Ralic Lo
7ee95f7f1e Convert to Python3 (#160)
* Convert to python3

* Remove .bak

* Remove (( and )) in print
2017-05-19 07:10:43 +05:30
rachmadani haryono
faf4b8b65a new: test: browse_by_index (#155) 2017-05-02 08:04:39 +05:30
rachmadani haryono
b758bdf902 chg: update test (#154)
* chg: update test for print_rec

* fix: index condition

* fix: limit max index
2017-04-30 05:26:14 +05:30
rachmadani haryono
63a5883d58
fix: test: change test (#149)
* fix: test: change priority on if-else branch

* fix: test: remove broken merged test code

* new: test: add win32 platform test for browser func

* chg: test: add noqa on print_single_rec

* new: test: test edit_update_rec with invalid input
2017-04-19 09:33:14 +05:30
Arun Prakash Jana
620f1944fb
Removed horribly unmaintainable test case. 2017-04-06 09:08:42 +05:30
rachmadani haryono
a576e54bed Feature/test update rec (#141)
* new: test: update_rec

* new: test: update all bookmarks

* new: test: add new return value when update all bookmarks

* chg: test: remove unused caplog
2017-04-03 01:59:45 +05:30
rachmadani haryono
f25f67bfc1 Feature/test add rec (#140)
* new: test: test empty url.

* new: test: test is_bad_url

* new: test: network_handler

* new: test: test exec arg on add_rec

* fix: test: restore global variable.

* chg: test: change test

- add more falsey url for test_add_rec_add_invalid_url
- add more arg for test_add_rec_exec_arg

* chg: test: use old test when testing is_bad_url
2017-03-30 22:22:47 +05:30
rachmadani haryono
7be3acc53e Feature/test print (#137)
* new: test: test for delete_rec (#132)

* chg: dev: add db instance for delay_commit check
* chg: dev: remove unused delete_rec test
* chg: test: not check delay commit on empty db test.
* chg: test: use simpler precise test for delete_rec
* fix: test: change pytest parametrize arg
* fix: test: fix instance of BukuDb
* fix: test: fix test.
* fix: test: logic on expected db len
* new: test: test for delete_rec
* new: test: test for delete_rec on empty database

* Needs timely commitment.

Removing the base implementation for rest APIs. At this point I believe it will
Be better handled by someone who needs it. The current contributions in this
area are very very infrequent. Defects and PRs remain pen over fortnights. It's
difficult to expect the same team to maintain the piece of code even if we ever
receive the full implementation from them.

* Roll ToDo list

* Feature/delete rec additional test data set (#133)

* new: test: additional data test set.

* new: test: test on non integer.

* chg: test: rename function for consistency.

* chg: test: change normalize function.

* chg: test: change max value for high var

* fix: test: use normalized index

* fix: test: remove 'max' as valid value

* chg: test: use hypothesis to test delete_rec index

* new: test: add hypothesis package

* chg: test: use hypothesis to test delete_rec index

* chg: test:  add hypothesis to travis

* chg: test: limit integer test.

* chg: dev: remove unused test

* fix: test: fix test on non integer.

* new: test: add big integer test on range in delete_rec method.

* fix: test: fix high low diff

* fix: test: skip only for python<3.5

* chg: test: change test_delete_rec_range_and_big_int

- remove skip
- use constant value instead sys.maxsize
- fix assert

* chg: test: use setup.py to manage test package instead travis

* chg: test: add tests extras on setup.py

* chg: test: change install test package.

* fix: test: fix whitespace

* fix: test: MAX_SQLITE_INT value

* chg: test: skip test for python<3.5

* fix: test: fix import

* chg: test: skip Impossible test

* chg: test: simplify test_delete_rec_on_non_interger

* Feature/tox test (#138)

* chg: test: mark slow test

* new: test: config for tox

* chg: test: mark function as non tox

* new: test: test print_rec with hypothesis

* chg: test: simplify test for print_single_rec

* fix: test: fix index test on test_print_rec_hypothesis

* fix: test: fix tox setting.

* fix: test: change test_print_single_rec to python3.5 only
2017-03-28 22:00:12 +05:30
rachmadani haryono
e2989b0dcc Feature/tox test (#138)
* chg: test: mark slow test

* new: test: config for tox

* chg: test: mark function as non tox
2017-03-28 19:43:22 +05:30
rachmadani haryono
0c7d5cfe97 Feature/delete rec additional test data set (#133)
* new: test: additional data test set.

* new: test: test on non integer.

* chg: test: rename function for consistency.

* chg: test: change normalize function.

* chg: test: change max value for high var

* fix: test: use normalized index

* fix: test: remove 'max' as valid value

* chg: test: use hypothesis to test delete_rec index

* new: test: add hypothesis package

* chg: test: use hypothesis to test delete_rec index

* chg: test:  add hypothesis to travis

* chg: test: limit integer test.

* chg: dev: remove unused test

* fix: test: fix test on non integer.

* new: test: add big integer test on range in delete_rec method.

* fix: test: fix high low diff

* fix: test: skip only for python<3.5

* chg: test: change test_delete_rec_range_and_big_int

- remove skip
- use constant value instead sys.maxsize
- fix assert

* chg: test: use setup.py to manage test package instead travis

* chg: test: add tests extras on setup.py

* chg: test: change install test package.

* fix: test: fix whitespace

* fix: test: MAX_SQLITE_INT value

* chg: test: skip test for python<3.5

* fix: test: fix import

* chg: test: skip Impossible test

* chg: test: simplify test_delete_rec_on_non_interger
2017-03-28 19:43:22 +05:30
rachmadani haryono
aab928c04f new: test: test for delete_rec (#132)
* chg: dev: add db instance for delay_commit check
* chg: dev: remove unused delete_rec test
* chg: test: not check delay commit on empty db test.
* chg: test: use simpler precise test for delete_rec
* fix: test: change pytest parametrize arg
* fix: test: fix instance of BukuDb
* fix: test: fix test.
* fix: test: logic on expected db len
* new: test: test for delete_rec
* new: test: test for delete_rec on empty database
2017-03-28 19:42:57 +05:30
rachmadani haryono
8fc2775b48 Feature/test (#130)
* new: test: test for BukuHTMLParser class

* new: test: test for BukuCrypt class

* chg: test: change getpass patch path

* new: test: test for ExtendedArgumentParser class

* new: test: test for functions.

* chg: test: fix warning for caplog

* chg: test:  exclude some test for python3.5 only
2017-03-18 19:11:59 +05:30
Arun Prakash Jana
b07d0ab8f5 Use colourful log levels in colour mode 2017-03-05 04:05:07 +05:30
Arun Prakash Jana
64799aff05 Rename APIs
New APIs: get_rec_all(), delete_rec_all()
Rename API open_in_browser() to browse()
Rename help APIs.
Update User Agent to Firefox 51.
Other minor changes
2017-02-19 11:30:10 +05:30