Florian Bruhin
fb3da578c5
Fix lint
2016-08-09 17:28:14 +02:00
Florian Bruhin
58fb41ab9d
tests: Fix webkitelem test for tagName
2016-08-08 15:34:45 +02:00
Florian Bruhin
0b16a36120
Clean up handling of focus element
...
Also fixes #1359 .
2016-08-08 14:05:30 +02:00
Florian Bruhin
dfbadaf7c2
Split WebElementWrapper into abstract/webkit parts
2016-08-08 13:04:53 +02:00
Florian Bruhin
68595e1736
Make sure base URL for resolve_url is absolute
2016-08-05 17:12:09 +02:00
Florian Bruhin
7a65559cce
Move hints._resolve_url to a WebElement method
2016-08-05 17:09:52 +02:00
Florian Bruhin
029ea2e5a7
Add miscwidgets.WrapperLayout.wrap
...
This makes it easier for an user of WrapperLayout to wrap a widget.
2016-08-04 19:22:44 +02:00
Florian Bruhin
08b70f0f4c
Add qutebrowser.utils.javascript
...
webelem.javascript_escape got renamed to javascript.string_escape, and a
new javascript.assemble got added to make it easier to call a function
inside a .js file.
2016-08-04 17:53:13 +02:00
Florian Bruhin
15863065cb
Fix <input /> test in test_webelem
2016-08-01 16:28:54 +02:00
Florian Bruhin
4bf94f3c24
Use order='strict' with qtbot.waitSignals
...
See #1702
2016-07-29 09:12:06 +02:00
Florian Bruhin
a7e9b4e5d7
Get rid of extend=True for qt_log_ignore
...
This is now the default, see #1702
2016-07-29 09:12:06 +02:00
Florian Bruhin
80d4af0da2
Add test webelem.__eq__ with other type
2016-07-28 17:29:45 +02:00
Florian Bruhin
a0ae96d43e
Add more WebElementWrapper tests
2016-07-28 14:46:32 +02:00
Florian Bruhin
d357ccf403
Add some more WebElementWrapper tests
2016-07-28 14:25:53 +02:00
Florian Bruhin
c674bda43c
Add new tests for test_webelem.test_vanished
...
This also adds test IDs for easier debugging.
2016-07-28 13:12:47 +02:00
Florian Bruhin
8d7baea9ae
Fix test_passed_geometry
2016-07-28 12:36:09 +02:00
Florian Bruhin
ebc72c9b5f
Fix TestRemoveBlankTarget.test_no_link
2016-07-28 12:36:09 +02:00
Florian Bruhin
540c62c232
Add only_visible to find_all_elements
2016-07-28 12:36:09 +02:00
Florian Bruhin
79b3f26de8
Decode HTML in test_filescheme
...
Otherwise we get a BytesWarning inside BeautifulSoup
2016-07-28 07:19:09 +02:00
Florian Bruhin
3ccb691e9f
tab API: Rename scroll to scroller
...
The scroll attribute did overwrite QWidget.scroll which is unfortunate.
2016-07-26 13:19:07 +02:00
Florian Bruhin
f4f6a3dac1
Merge branch 'open-download' of https://github.com/Kingdread/qutebrowser into Kingdread-open-download
2016-07-26 10:32:34 +02:00
Ryan Roden-Corrent
7d36847f77
Prevent test_tab from creating user data dir.
...
This is another case (like test_qt_javascript) that needs redirection
of XDG_DATA_HOME to prevent Qt from creating ~/.share/local/qute_test.
2016-07-17 07:07:05 -04:00
Ryan Roden-Corrent
f589e44700
Don't write to user datadir in test_qt_javascript.
...
This was more complicated than the other data/config/cachedir test
fixes, as QtWebEngine was accessing the datadir directly (and bypassing
standdarddir.data).
This means the tmpdir_data stub is not enough, we need to set
XDG_DATA_HOME to redirect access.
2016-07-15 13:46:50 -04:00
Ryan Roden-Corrent
d9b546701e
Prevent creation of user dirs on several tests.
...
Use the config_tempdir and data_tempdir fixtures for several tests that
were creation ~/.config/qute_test or ~/.local/share/qute_test.
2016-07-15 13:46:50 -04:00
Ryan Roden-Corrent
a6695ea1be
Prevent test_adblock from creating real config dir.
...
Don't create ~/.config/qute_test by mocking out standdarddir.config for
all tests in this module.
This adds config_tmpdir to fixtures.py and moves temp_datadir from
test_adblock to fixtures.py as it will be needed more broadly.
2016-07-15 13:46:50 -04:00
Florian Bruhin
325846f20a
Remove doubled check
2016-07-14 16:33:59 +02:00
Florian Bruhin
b59a1766c8
Fix long line
2016-07-13 21:19:02 +02:00
Florian Bruhin
c9176b7c58
QtWebEngine: Fix 'unset' with run_js_blocking
2016-07-13 18:17:37 +02:00
Florian Bruhin
a7509d5978
Fix lint
2016-07-13 16:01:12 +02:00
Florian Bruhin
5b1cca92ab
Add run_js_blocking to tab API
2016-07-13 13:47:30 +02:00
Florian Bruhin
4f97b6342d
tests: Add a tab fixture in test_tab
2016-07-13 13:47:29 +02:00
Florian Bruhin
558ef290e4
tests: Add a view fixture in test_tab
2016-07-13 13:47:26 +02:00
Florian Bruhin
68f5ed4fa4
tests: Fix FakeWebTabScroller
...
Pass tab correctly
2016-07-13 13:47:26 +02:00
Daniel Schadt
05c09a1476
tests: fix test_adblock for new download manager
2016-07-12 17:06:40 +02:00
Florian Bruhin
cd4eff364a
Add printing to tab API
...
This fixes printing for QtWebKit, and hopefully will make printing to
PDF work with QtWebEngine with Qt >= 5.7
2016-07-12 12:54:11 +02:00
Florian Bruhin
37c6d63ddf
tests: Ignore "load glyph failed" warnings
...
See #1637
2016-07-12 09:45:40 +02:00
Florian Bruhin
e80475ed57
Remove support for showing JS statusbar messages
...
Closes #1579 .
2016-07-11 16:19:44 +02:00
Florian Bruhin
43c1f62e39
Also skip test_tab on PyQt < 5.6
...
See #1638
2016-07-11 09:10:11 +02:00
Florian Bruhin
b791095324
Rename browser.tab module and classes
2016-07-10 17:27:02 +02:00
Florian Bruhin
2136d00aa2
tests: Add a fake_args fixture
2016-07-10 17:04:25 +02:00
Florian Bruhin
949172809d
Add tab_registry to test_tab
2016-07-10 16:57:02 +02:00
Florian Bruhin
334f6cda4f
tab: Rename modeman to mode_manager
...
To avoid it being mixed up with the modeman module
2016-07-08 10:38:51 +02:00
Florian Bruhin
e4b0b7fffd
Fix lint
2016-07-07 20:12:17 +02:00
Florian Bruhin
17466b4f26
Fix some lint
2016-07-07 18:32:52 +02:00
Florian Bruhin
5107a87291
Fix test_tab tests
2016-07-07 18:32:52 +02:00
Florian Bruhin
78f425c98b
Add AbstractTab.data
2016-07-07 18:32:52 +02:00
Florian Bruhin
4fea285740
Add win_id attribute
2016-07-07 18:32:52 +02:00
Florian Bruhin
0c1e266073
Use QWebView/QWebEngineView for test_tab
2016-07-07 18:32:52 +02:00
Florian Bruhin
5b9ae8bc85
Initial history implementation
2016-07-07 18:32:52 +02:00
Florian Bruhin
37c3dbbc7d
Fix test_tab
2016-07-07 18:32:52 +02:00
Florian Bruhin
4305966f7b
Add WrapperLayout/AbstractTab
2016-07-07 18:32:52 +02:00
Florian Bruhin
70117265d6
Fix some a/an misspellings
...
Thanks to https://github.com/jwilk/anorack
2016-07-05 08:34:03 +02:00
Ryan Roden-Corrent
d49fa7c4a3
Clean up objreg after test_history.
...
test_init in test_history was leaving a web-history in the objreg,
which was interfering with the completion tests.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
9578a3324e
Break two long lines that were failing pylint.
2016-06-13 22:31:21 -04:00
Florian Bruhin
4fccc89d7d
Split browser into browser/browser.webkit
2016-06-13 11:18:21 +02:00
Florian Bruhin
f70a75978b
Move browser.network.pastebin to misc
2016-06-13 09:48:53 +02:00
Florian Bruhin
66938ed44b
Full redirect support for history
...
When a redirect occurs, the item is saved in history with a -r suffix
now. When opening qutebrowser that's picked up and the item is hidden
from completion.
2016-06-10 14:40:42 +02:00
Florian Bruhin
0a25bb508a
Fix lint
2016-06-10 12:21:48 +02:00
Florian Bruhin
9298fa697b
Allow to pass atime to WebHistory.add_url
...
This makes a lot of tests easier and/or more exact.
2016-06-10 12:12:29 +02:00
Florian Bruhin
7511bc1fe5
tests: 100% coverage for browser.history
2016-06-10 12:01:14 +02:00
Florian Bruhin
14a04f1535
Fix lint
2016-06-09 22:03:35 +02:00
Florian Bruhin
185b4bc18b
Add more tests for browser.history
2016-06-09 21:14:04 +02:00
Florian Bruhin
d3dd6d2f77
Add hypothesis test for history.Entry.from_str
2016-06-09 21:14:04 +02:00
Florian Bruhin
33f01d8375
Fix lint
2016-06-09 21:14:03 +02:00
Florian Bruhin
9510af9912
Use QUrl with QWebHistory
...
Now that we have our own history implementation, we get the URLs as QUrl
and not as string - so no point in converting them to string and back.
2016-06-09 21:14:03 +02:00
Florian Bruhin
5f25ce69ec
Add some tests for browser.history
2016-06-09 21:14:03 +02:00
Florian Bruhin
789b9c9308
tests: Yield fake_save_manager from fixture
2016-06-09 17:44:04 +02:00
Florian Bruhin
75669dd21b
tests: Move fake_save_manager to helper.fixtures
2016-06-09 17:44:04 +02:00
Florian Bruhin
cca26f0f13
Fix lint
2016-06-08 09:45:05 +02:00
Florian Bruhin
4e86a888c9
Add webelem tests for JS/non-JS rect_on_view
2016-06-06 15:42:30 +02:00
Florian Bruhin
10630e30ab
hints: Integrate _get_first_rectangle into webelem
2016-06-06 11:56:15 +02:00
Florian Bruhin
86be7ad82c
Move file_url from utils.jinja to utils.urlutils
2016-05-29 22:44:40 +02:00
Florian Bruhin
afcb018ee2
Fix some spelling mistakes
...
Found via http://jwilk.net/software/mwic
2016-05-27 12:07:00 +02:00
Liam BEGUIN
f689cca101
Added missing All group
2016-05-17 23:57:36 -04:00
Liam BEGUIN
ce0d23bd10
Added tests for the inputs group
2016-05-17 19:58:48 -04:00
Florian Bruhin
f306ca9b53
Fix lint
2016-05-08 11:14:42 +02:00
Florian Bruhin
b4272975f2
Revert "Use lists instead of tuples"
...
This reverts commit eb5bfc1659
.
2016-05-08 11:09:47 +02:00
Florian Bruhin
4403f02ac5
Fix HostBlocker.on_config_changed with no datadir
2016-05-07 23:35:30 +02:00
Florian Bruhin
6d1764e732
Clear blocked hosts on start correctly
2016-05-07 23:31:35 +02:00
Florian Bruhin
f6544786c1
dict
2016-05-07 22:41:22 +02:00
Florian Bruhin
2d8bde62a5
docstring
2016-05-07 22:39:53 +02:00
Florian Bruhin
9e64e5eab4
Check CommandError exception value
2016-05-07 22:39:09 +02:00
Florian Bruhin
f4f329714d
Reformat dicts
2016-05-07 22:38:37 +02:00
Florian Bruhin
1a03388fb5
Fix docstrings
2016-05-07 22:28:06 +02:00
Florian Bruhin
eb5bfc1659
Use lists instead of tuples
2016-05-07 22:12:28 +02:00
Florian Bruhin
bc8d19f003
Fix typo
2016-05-07 22:09:43 +02:00
Florian Bruhin
2ae8ecff71
Use qapp fixture in all adblock tests
2016-05-07 22:08:55 +02:00
Florian Bruhin
7db6f52fa1
Merge branch 'test_adblock' of https://github.com/jcorentin/qutebrowser into jcorentin-test_adblock
2016-05-07 22:06:43 +02:00
Florian Bruhin
076b486368
Merge branch 'issue-1412' of https://github.com/Kingdread/qutebrowser into Kingdread-issue-1412
2016-04-27 21:19:04 +02:00
Florian Bruhin
2a343cb3a1
Various code style improvements
2016-04-27 20:25:27 +02:00
Daniel Schadt
758fb94414
tests: add test for DiskCache with cache_dir=None
2016-04-27 00:04:02 +02:00
Florian Bruhin
aad2407de1
Merge branch 'force-current-tab' of https://github.com/paretje/qutebrowser into paretje-force-current-tab
2016-04-01 06:13:08 +02:00
Kevin Velghe
0652637fbe
Refactor unit tests for remove_blank_target
2016-04-01 01:32:27 +02:00
Florian Bruhin
89742beb4e
pylint: useless-suppression in test_qt_javascript
...
When QtWebEngine is available, the suppression is useless.
2016-03-31 20:18:26 +02:00
Kevin Velghe
e90ad3d9c0
Complete coverage for webelem
2016-03-31 10:25:44 +02:00
Kevin Velghe
00f1e699d4
Add extra test to test_remove_blank_target
2016-03-30 23:46:02 +02:00
Kevin Velghe
dd4710d596
Fix test_remove_blank_target
2016-03-30 19:54:42 +02:00
Kevin Velghe
a432102be0
Add webelem tests for remove_blank_target
2016-03-30 19:08:37 +02:00
Florian Bruhin
5a5e8167dd
Fix lint
2016-03-29 23:20:39 +02:00
Florian Bruhin
6c7e2492e9
Merge branch 'dirbrowser-issue-1334' of https://github.com/Kingdread/qutebrowser into Kingdread-dirbrowser-issue-1334
2016-03-29 22:38:04 +02:00
Florian Bruhin
fc7e75c355
Fix lint
2016-03-29 22:30:26 +02:00
Florian Bruhin
4067d38cb0
Add some tests for QtWebKit/Engine JS capabilities
2016-03-29 22:08:49 +02:00
Florian Bruhin
de5ecbf4e7
Fix lint
2016-03-29 21:10:29 +02:00
Florian Bruhin
f43cbed72f
tests: Inherit HTTPPostStub from QObject
...
This way we can test the actual signals instead of calling
on_client_success by hand.
2016-03-29 19:22:28 +02:00
Daniel Schadt
2db5b95552
tests: use "if not parent_elem"
...
Also add a new test for browsing the root directory
2016-03-29 12:36:43 +02:00
Daniel Schadt
5e73a2ea37
dirbrowser: move parent dir logic to own function
2016-03-28 23:10:20 +02:00
Daniel Schadt
e97b10517f
tests: use file_url for dirbrowser tests
...
Otherwise the tests will fail on windows.
2016-03-28 23:10:20 +02:00
Daniel Schadt
700756aa16
tests: add more cases for dirbrowser.is_root
...
The trailing slash might have an effect on the function result, so we
should have cases with/without the slash.
2016-03-28 23:08:54 +02:00
avk
c9bb6d0111
tests for browser.network.pastebin - code refactor
2016-02-22 20:46:22 +01:00
avk
90c8078225
More tests for browser.network.pastebin
2016-02-22 16:09:57 +01:00
avk
6826a97910
Tests for browser.network.pastebin
2016-02-22 15:10:39 +01:00
Florian Bruhin
5311576c34
Check pep257 via flake8.
...
We'll still keep the pydocstyle environment though until flake8-pep257 adds
support for that:
https://github.com/Robpol86/flake8-pep257/issues/6
2016-02-10 19:18:47 +01:00
Daniel Schadt
df8f87f8b6
tests: add tests for qutescheme
2016-02-05 15:14:23 +01:00
Florian Bruhin
4d9ea06768
tests: Make test IDs predictable.
...
This means we could use xdist in the future.
2016-01-25 22:15:31 +01:00
Corentin Julé
6fd8dc4e57
Correct test_config_change
2016-01-23 16:34:05 +01:00
Corentin Julé
47261dbd30
Code cleanup / Good practices
2016-01-23 16:15:19 +01:00
Florian Bruhin
526441bcae
Fix new flake8 lint.
...
For some reason these issues weren't shown with pytest-pep8/flakes.
2016-01-22 17:33:58 +01:00
Florian Bruhin
a249d8d426
tests: Ignore another Qt warning by hypothesis.
2016-01-20 08:06:36 +01:00
Florian Bruhin
9ed79ad57d
tests: Switch to qtbot.assertNotEmitted.
2016-01-08 10:00:42 +01:00
Florian Bruhin
f004e45566
tests: Remove pointless CookieJar test.
...
There's no code between those two lines which could possibly emit that signal.
2016-01-08 09:57:04 +01:00
Florian Bruhin
1fb34331e5
tests: Default to raising=True for qtbot.
...
- qtbot.waitSignal with raising=True is the default this way, so we remove the
raising=True.
- qtbot.waitSignal with raising=False stay untouched
- Some qtbot.waitSignal without raising had one added (because we don't want it
to raise)
- Some qtbot.waitSignal without raising actually should've raised, which they
do now.
2016-01-08 09:49:06 +01:00
Florian Bruhin
d75ee78845
Clean up pdfjs tests.
2016-01-05 18:47:50 +01:00
Florian Bruhin
a97ba9aa09
Merge branch 'pdfjs' of https://github.com/Kingdread/qutebrowser into Kingdread-pdfjs
2016-01-05 07:21:26 +01:00
Florian Bruhin
a5f2ac5f03
Adjust copyright years.
2016-01-04 07:12:39 +01:00
Daniel Schadt
7944217da4
Adjust pdfjs unit tests for new logging level
...
The script generation output was changed because we changed the logging
level, this adjusts the unit tests to match the new output.
2015-12-20 20:14:17 +01:00
Daniel Schadt
f2ed14a24a
Add unit tests for browser.pdfjs
2015-12-20 19:24:41 +01:00
Daniel Schadt
0811418746
pdfjs: don't embed data in html
...
We don't need more than one copy of the pdf.
2015-12-20 19:24:41 +01:00
Daniel Schadt
dc9cd47afc
pdfjs: add unittest for script generation
2015-12-20 19:24:41 +01:00
Florian Bruhin
e78d2a8399
tests: Check args for loadFinished signals.
2015-12-17 07:49:28 +01:00
Florian Bruhin
e6284ed5d4
tests: Improve some ugly test IDs.
2015-12-16 22:21:29 +01:00
Corentin Julé
ff8d5370a3
Add ideas for improvement
2015-12-08 10:37:04 +01:00
Corentin Julé
99ede3f551
Improve coverage and code cleanup
2015-12-08 00:52:51 +01:00
Corentin Julé
f8fcd48998
remove now useless tests
2015-12-07 00:11:19 +01:00
Corentin Julé
6be0ff67f7
Replace some tests with a generic host blocking list
2015-12-07 00:09:51 +01:00
Corentin Julé
a24a7790cd
Improve code readability
2015-12-06 19:33:35 +01:00
Corentin Julé
8bff518ba4
Refactor and add tests
2015-12-06 15:35:10 +01:00
Corentin Julé
ac3d0b9a4c
Comply with pylint
2015-12-06 00:51:44 +01:00
Corentin Julé
1ba634969a
Correct QUrl creation
2015-12-06 00:42:33 +01:00
Corentin Julé
472585edd5
Add tests for HostBlocker class
2015-12-06 00:10:56 +01:00
Corentin Julé
9da15ae2f9
Correct is_whitelisted_host test
2015-12-05 12:41:52 +01:00
Corentin Jule
d55e6d7d7e
Comply with PEP257
2015-12-05 01:35:20 +01:00
Corentin Jule
cc946ba6e6
implementation of config_stub fixture
2015-12-05 01:09:11 +01:00
Corentin Jule
8222a86201
Remove useless test
2015-12-05 00:16:38 +01:00
Corentin Jule
3426dd06f6
Add some docstrings
2015-12-04 21:57:34 +01:00
Corentin Jule
95b200ead9
Pylint code cleanup
2015-12-04 01:52:00 +01:00
Corentin Jule
8dd0249af9
Code cleanup - Pep8
2015-12-03 22:00:39 +01:00
Corentin Jule
2d850f7106
Add tests for first functions of adblock.py
2015-12-03 21:12:51 +01:00
Florian Bruhin
150a83d8f4
pylint: Remove unneeded supressions.
2015-12-01 22:03:58 +01:00
Florian Bruhin
67f726c9d4
tests: Add another BOM test for javascript_escape.
2015-11-25 18:47:16 +01:00
Florian Bruhin
73e9fd1118
Handle BOM (\ufeff) for webelem.javascript_escape.
2015-11-25 18:14:52 +01:00
Florian Bruhin
24a71e5c2e
Fix webelem.javascript_escape with U+2028/U+2029.
2015-11-25 10:32:22 +01:00
Daniel Schadt
c12011c84d
Style fixes
2015-11-21 00:10:49 +01:00
Daniel Schadt
3438a45b19
Merge branch 'master' into download-page
2015-11-18 19:27:26 +01:00
Florian Bruhin
b61462ccb8
Fix the style fixes.
2015-11-13 22:41:37 +01:00
Florian Bruhin
1da7996c3b
Style fixes.
2015-11-13 22:27:41 +01:00
Florian Bruhin
416cfaf002
tests: Switch from pytest-capturelog to catchlog.
2015-11-11 19:57:03 +01:00
Florian Bruhin
7cddd52b2d
Merge branch 'download-page' of https://github.com/Kingdread/qutebrowser into Kingdread-download-page
2015-11-10 22:39:07 +01:00
Florian Bruhin
250f0e7410
Merge branch 'test-browser-cache-more' of https://github.com/lamarpavel/qutebrowser into lamarpavel-test-browser-cache-more
2015-11-10 18:57:28 +01:00
Lamar Pavel
a2a1b77857
Undo unnecessary change
2015-11-10 03:45:38 +01:00
Lamar Pavel
fe8ddd79c0
Use config_stub.set instead of emitting sginal manually
2015-11-10 03:43:02 +01:00
Daniel
5601c8e7c1
mhtml: Skip test if cssutils is unavailable
...
Instead of failing the test (assert cssutils is not None)
2015-11-09 17:01:08 +01:00
Daniel
f2f9529af7
Remove sys import in test_mhtml
2015-11-09 17:01:08 +01:00
Daniel
ed8a6a4c7b
Update to cssutils 1.0.1
...
This fixes cssutils on Python 3.5 (yay!).
2015-11-09 17:01:08 +01:00
Daniel
dd8ff860f4
Fix lint
2015-11-09 16:59:16 +01:00
Daniel
b027e6af1b
Mark cssutils tests as xfail on Python >= 3.5
2015-11-09 16:59:16 +01:00
Daniel
dab0db30a5
Remove tests for remove_file from test_mhtml.py
2015-11-09 16:59:16 +01:00
Daniel
957d68c477
Revert "Remove cssutils from mhtml.py"
...
This reverts commit 22a0f0952704d284846ab2572790d99a85515c57.
2015-11-09 16:59:16 +01:00
Daniel
ce1a99cc7c
Remove cssutils from mhtml.py
2015-11-09 16:59:16 +01:00
Daniel
420c087373
use cssutils
2015-11-09 16:59:16 +01:00
Daniel
749b1c02cc
Style changes for mhtml and test_mhtml
2015-11-09 16:59:16 +01:00
Daniel
b05a0d191d
Fix module path in test_mhtml
...
Also fix docstring for _get_css_imports
2015-11-09 16:59:16 +01:00
Daniel
2eeace1c2c
Move misc.mhtml to browser.mhtml
2015-11-09 16:59:16 +01:00
Lamar Pavel
cbb9fd203a
Fix test of existing metadata files
...
In test_cache_existing_metadata_file() we are now getting the correct
path to the metadata files, thus making the test useful. This was the
last missing test, the cache is now 100% covered (issue#999).
2015-11-05 23:08:38 +01:00
Florian Bruhin
867f509bcc
tests: Ignore QDisabledNetworkReply warning.
...
I guess they are displayed now during teardown with the changes in pytest-qt.
2015-11-01 18:04:09 +01:00
Lamar Pavel
e86795f644
Add another test for pyqtslot on_config_changed
...
There are now two tests changing the config for private-browsing, covering
both True->False and False->True.
2015-11-01 14:55:03 +01:00
Lamar Pavel
70a6fe1561
Add tests triggering pyqtslot on_config_changed
...
Both settings relevant to the cache (cache-size and private-browsing) are
changed, a signal is emitted and the effect on the cache is verified.
2015-11-01 14:39:43 +01:00
Lamar Pavel
d127469d78
Add tests for fileMetaData()
...
One of those three tests is not complete as I couldn't yet find a way
to predict the path and name of cached files when using tmpdir.
2015-10-31 21:56:15 +01:00
Lamar Pavel
b94f7c7681
Add test for metaData() with cache deactivated
2015-10-31 18:49:58 +01:00
Lamar Pavel
404da750c6
Fix insertion into wrong cache
2015-10-31 18:32:14 +01:00
Lamar Pavel
571d7a680b
Fix all other tests that weren't using DiskCache
...
So yeah, this explains a lot of the missing paths reported by the
coverage analysis.
2015-10-31 17:09:00 +01:00
Lamar Pavel
35762955cf
Fix test_cache_remove_data
...
The test was not using qutebrowsers DiskCache class at all but Qts
QNetworkDiskCache. As a result the code paths of DiskCache.remove()
were never visited.
2015-10-31 16:57:00 +01:00
Lamar Pavel
3c2bc670ff
Add test for alternate path of DiskCache.clear()
2015-10-31 16:33:01 +01:00
Lamar Pavel
e1446c3448
Add another test for deactivated cache
...
This one is testing the missing path in updateMetaData for a not activated
cache.
2015-10-31 16:28:17 +01:00
Lamar Pavel
39e37b043e
Add more tests for deactivated cache
...
Getting closer to 100% completion, add tests for missing paths of
DiskCache.insert and DiskCache.cacheSize().
2015-10-31 16:13:29 +01:00
Lamar Pavel
27ec9e1c43
Fix typo
2015-10-30 02:46:43 +01:00
Lamar Pavel
b5af1c8730
Add three tests querying and removing data
...
Two of these are testing return values of a deactivated cache and the
third is trying to query data that was never inserted into an active
cache.
2015-10-30 02:41:17 +01:00
Lamar Pavel
b3fa19eb96
Add sanity test involving almost everything
2015-10-30 02:03:34 +01:00
Lamar Pavel
05994ad90e
Add theshold to cache-size test
...
The strict test condition before was violated by Qt internals which
seem to violate documented guarantees but are not part of qutebrowsers
code and thus can only be tested to a certain extent.
2015-10-30 01:22:16 +01:00
Lamar Pavel
9a8032fa91
Fix pylint errors (upper case variable names)
2015-10-29 03:13:25 +01:00
Lamar Pavel
a6526a1be2
Add tests to update and verify meta data of cache entries
2015-10-29 02:57:16 +01:00
Lamar Pavel
2cab750a54
Add test for DiskCache.remove()
2015-10-29 02:37:32 +01:00
Lamar Pavel
e4c79a68d1
re-write tests to fill the cache
...
Previously the tests were not adding any data to the cache, making the
tests for a cache size other than 0 meaningless.
The new tests create cache entries and fill them with some data that
can be tested against.
2015-10-29 02:28:57 +01:00
Lamar Pavel
24887a6564
Adjust coding style based on pylint warnings
2015-10-23 01:49:00 +02:00
Lamar Pavel
4a8dec5eb8
Code style; complete first batch of tests.
2015-10-21 22:31:46 +02:00
Lamar Pavel
82c608038d
Coding style
2015-10-21 22:31:46 +02:00
Lamar Pavel
0b78fb65c9
Test if cleared cache is actually empty
2015-10-21 22:31:46 +02:00
Lamar Pavel
aa62a547d5
Use tmpdir fixture instead of "/foo/bar"
2015-10-21 22:31:46 +02:00
Lamar Pavel
a99d3f6525
Add first 3 tests for browser.cache
...
Note: test_cache_deactivated_private_browsing is currently failing
2015-10-21 22:31:46 +02:00
Florian Bruhin
c8346a11fc
Merge branch 'jinja' of https://github.com/meles5/qutebrowser into meles5-jinja
2015-10-17 19:04:36 +02:00
meles5
2398762e85
Fix tests
2015-10-17 18:29:13 +02:00
Florian Bruhin
24dc166e1f
tests: Use extend=True for qt_log_ignore marks.
...
This should finally resolve the warning flakiness on OS X.
2015-10-16 06:24:29 +02:00
Florian Bruhin
cabbe406e3
tests: Fix ignoring of "load glyph failed" message.
...
The mark seems to be swallowed somehow when it's after @hypothesis.given.
See https://github.com/DRMacIver/hypothesis/issues/189
2015-10-05 08:11:26 +02:00
Florian Bruhin
11961db72c
Add maxlen argument to ErrorNetworkReply.readData.
...
This was missing before, causing a (hidden) exception with Python < 3.5, and
this with 3.5:
TypeError: readData() takes 1 positional argument but 2 were given
During handling of the above exception, another exception occurred:
SystemError: PyEval_EvalFrameEx returned a result with an error set
Fixes #969 .
2015-09-29 08:41:20 +02:00
Florian Bruhin
4854ca42fd
Fix tests without DISPLAY.
2015-09-28 21:50:55 +02:00
Florian Bruhin
0de1e40f20
Add filescheme test for names with special chars.
...
Inspired by https://github.com/QupZilla/qupzilla/pull/1711
2015-09-24 06:45:33 +02:00
Florian Bruhin
57242e925c
Fix names of constants.
2015-09-16 23:00:02 +02:00
Florian Bruhin
d5baed5e83
Merge branch 'cookies_tests' of https://github.com/acogneau/qutebrowser into acogneau-cookies_tests
2015-09-16 22:58:28 +02:00
Florian Bruhin
88167ce4ce
Shorten test IDs.
2015-09-16 20:25:02 +02:00
Alexander Cogneau
ec11a61ed8
Fix failing tests
2015-09-13 23:08:31 +02:00
Alexander Cogneau
c08beda1aa
Code cleanup
2015-09-12 22:11:14 +02:00
Alexander Cogneau
851bf4cd31
Fix pylint
2015-09-06 16:13:41 +02:00
Alexander Cogneau
6541a360b1
Final cooikies tests
2015-09-06 00:24:38 +02:00
Alexander Cogneau
d36c701b07
Fixed comments
2015-09-04 11:44:59 +02:00
Alexander Cogneau
418328e61b
Cookie tests done
2015-09-03 18:17:39 +02:00
Alexander Cogneau
96e3a0b1f1
first cookie tests
2015-09-03 17:24:01 +02:00
Florian Bruhin
8ea91b5bbc
Fix cookiejar_and_cache move.
2015-08-31 08:00:21 +02:00
Florian Bruhin
79c1867e6c
Don't save cookies when starting in private mode.
...
Whoops... :(
Fixes #903 .
2015-08-30 23:17:48 +02:00
Florian Bruhin
6df00f8266
Move cookiejar_and_cache fixture to conftest.py.
2015-08-30 23:11:23 +02:00
Florian Bruhin
6d8854bc07
Simplify usage of tabhistory.TabHistoryItem.
2015-08-23 18:16:19 +02:00
Florian Bruhin
543053c8f5
test_signalfilter: Remove unused fixture.
2015-08-20 07:14:32 +02:00
Florian Bruhin
2c5269acd6
Reorganize tests directory.
2015-08-18 20:19:02 +02:00