Commit Graph

233 Commits

Author SHA1 Message Date
Ryan Roden-Corrent
3c676f9562 Fix pylint/flake8 errors for SQL work. 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
a050cb94f6 Report sqlite version with --version. 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
df995c02a3 Get rid of varargs in sql.run_query.
Things are clearer when just passing a list.
2017-06-19 07:42:12 -04:00
Ryan Roden-Corrent
839d49a8ac Fix up pylint/flake8 for completion revamp. 2017-06-19 07:42:12 -04:00
Ryan Roden-Corrent
a774647c26 Get test_models mostly working again.
- Adjust _check_completions to work for CompletionModel and SqlCompletionModel
- Move sql initialization into a reusable fixture
- Remove the bookmark/quickmark/history stubs, as they're now handled by sql
- Disable quickmark/bookmark model tests until their completion is ported to
  sql.
- Disable urlmodel tests for features that have to be implemented in SQL:
    - LIMIT (for history-max-items)
    - Configurable column order (for quickmarks)
    - Configurable formatting (for timestamp-format
2017-06-19 07:42:12 -04:00
Ryan Roden-Corrent
f43f78c40f Implement SQL interface.
When qutebrowser starts, it creates an in-memory sqlite database. One
can instantiate a SqlTable to create a new table in the database. The
object provides an interface to query and modify the table.

This intended to serve as the base class for the quickmark, bookmark,
and history manager objects in objreg. Instead of reading their data
into an in-memory dict, they will read into an in-memory sql table.

Eventually the completion models for history, bookmarks, and quickmarks
can be replaced with SqlQuery models for faster creation and filtering.

See #1765.
2017-06-19 07:42:12 -04:00
Florian Bruhin
df6c4c6e73 Fix earlyinit.qt_version issues 2017-06-19 09:42:49 +02:00
Florian Bruhin
fdba676933 Move version.qt_version() to earlyinit
Importing version in earlyinit is a bad idea, as it already pulls in a lot of
stuff we don't want.
2017-06-19 08:57:29 +02:00
Florian Bruhin
27ea9a6954 Fix test_debug_trace 2017-06-05 20:17:39 +02:00
Florian Bruhin
7186dcb98f Send crash reports to private pastebin
Fixes #481
2017-05-29 09:20:10 +02:00
Florian Bruhin
ea2fbc427a tests: Use match= for pytest.raises 2017-05-23 09:36:00 +02:00
Florian Bruhin
af7923de4d tests: Use pytest.param 2017-05-23 08:08:46 +02:00
Florian Bruhin
00a7a0cee6 Reorganize pylint config
This removes various stuff we don't need anymoe, and also re-enables and fixes
the import order check.
2017-05-17 20:20:12 +02:00
Florian Bruhin
c6e31391de Fix most tests/lint 2017-05-10 09:19:24 +02:00
Florian Bruhin
1c50377c0a Initial work on new private browsing 2017-05-10 07:00:21 +02:00
Florian Bruhin
822623f2ed Finally update copyrights... 2017-05-09 21:37:03 +02:00
Florian Bruhin
004eb742f6 Stabilize test_guiprocess 2017-03-31 13:05:34 +02:00
Florian Bruhin
a55d1b1ee8 Save old socket for IPC
At least on Windows with Qt 5.8, we get readyRead notifications *after*
disconnect...
2017-03-31 13:03:17 +02:00
Ryan Roden-Corrent
a68f997d95 Make keyhint delay configurable.
ui.keyhint-delay controls the time from starting a keychain to showing the
keyhint dialog. Resolves #2462.
2017-03-22 21:50:26 -04:00
Florian Bruhin
5fb6d26465 Stabilize some tests 2017-03-06 06:28:26 +01:00
Florian Bruhin
199a2ffe27 Remove unneeded deleted attribute for FakeSocket 2017-03-05 15:15:12 +01:00
Florian Bruhin
5d0c9440f6 Fix monkeypatch 2017-03-01 12:12:40 +01:00
Florian Bruhin
ca4f249c30 Use three-argument form of monkeypatch.*attr 2017-03-01 11:33:41 +01:00
Florian Bruhin
29ffa3d134 Add a fullscreen notification overlay
From the spec:

  User agents should ensure, e.g. by means of an overlay, that the end user is
  aware something is displayed fullscreen. User agents should provide a means of
  exiting fullscreen that always works and advertise this to the user. This is
  to prevent a site from spoofing the end user by recreating the user agent or
  even operating system environment when fullscreen.

https://fullscreen.spec.whatwg.org/#security-and-privacy-considerations
2017-02-06 16:22:58 +01:00
Florian Bruhin
de50f30b9b Replace all GitHub links 2017-02-05 00:13:11 +01:00
Florian Bruhin
81d67f8a2c Remove support for an empty data/config/cachedir
See #2115
2016-11-14 23:13:21 +01:00
Florian Bruhin
a8d1187ba0 Fix keyhint tests 2016-11-03 08:40:41 +01:00
Florian Bruhin
b4872192c3 Merge branch 'more-tests' of https://github.com/HolySmoke86/qutebrowser into HolySmoke86-more-tests 2016-10-30 23:24:15 +01:00
Daniel Karbach
cfa9068eed flake...
*quitely shakes fist and then submits*
2016-10-28 11:23:05 +02:00
Daniel Karbach
6fff45daeb check exception messages in utilcmds tests 2016-10-28 10:50:58 +02:00
Daniel Karbach
e167f77d68 separate test for hunter exceptions 2016-10-28 10:44:55 +02:00
Daniel Karbach
6e510372fb more cleanup
jeez, this is getting embarrassing
2016-10-27 15:50:17 +02:00
Daniel Karbach
23a62e952d another lineparser/utilcmds test revision
* verify exception message in lineparser double open
* check for hunter with `pytest.importorskip`
* stricter exception checking in debug_trace test
2016-10-27 14:56:28 +02:00
Daniel Karbach
64cf8fcd39 lineparser/utilcmds test cleanup
* fix date in copyright
* remove redundant class docstrings
* don't rename utilcmds module in unit test
* use `mode_manager` fixture in place of FakeModeMan
* some whitespace
2016-10-27 14:23:01 +02:00
Florian Bruhin
ece3f3a2e1 Update to pytest-qt 2.1.0 2016-10-26 07:42:41 +02:00
Daniel Karbach
442549555b skip segfault test on windows
while technically possible (on both machine and OS level), termination due
to SIGSEGV cannot be prevented
maybe the test could be rewritten to spawn a subprocess and check its exit
status (of 11)
2016-10-25 17:24:14 +02:00
Daniel Karbach
9038b28ea4 different mocking of open() in lineparser test
apparently, python 3.4 (and less, probably) does not import
builtins into modules
2016-10-25 08:52:08 +02:00
Daniel Karbach
b5ffe979aa "typo" in utilcmds test 2016-10-25 08:48:04 +02:00
Daniel Karbach
e0d1fafe43 tests for misc.utilcmds 2016-10-24 17:13:38 +02:00
Daniel Karbach
bdb96becd6 unit tests for misc.lineparser 2016-10-24 17:10:47 +02:00
Florian Bruhin
ab7cbfdea0 Improve keyhint tests
This also brings them back to 100% coverage
2016-09-25 16:42:13 +02:00
Florian Bruhin
123aace3e8 Fix keyhint tests 2016-09-23 15:05:01 +02:00
Florian Bruhin
49f8fa6d76 Add some tests for earlyinit.fix_harfbuzz
See #1948
2016-09-16 08:43:12 +02:00
Florian Bruhin
7e30792bfe Fix lint 2016-09-15 14:51:22 +02:00
Florian Bruhin
fce9783570 Fix unit tests
Apart from changed parameters, messages now log even when messagemock is
used, so we needed to add a few caplog.at_level calls.
2016-09-15 14:51:22 +02:00
Florian Bruhin
a2254b671c Adjust tests/messagemock 2016-09-15 14:51:21 +02:00
Florian Bruhin
f16b96aa28 Initial implementation of new messages 2016-09-15 14:51:21 +02:00
Florian Bruhin
2df971a79c Move short_tmpdir fixture to conftest.py 2016-09-09 18:46:51 +02:00
Florian Bruhin
7f013b7808 Fix lint 2016-09-06 17:00:25 +02:00
Florian Bruhin
4f55b435f0 Move various session unit tests to BDD tests 2016-09-06 13:55:28 +02:00