Commit Graph

234 Commits

Author SHA1 Message Date
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
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
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
Florian Bruhin
468b2c4ade Merge branch 'test-browser-cache' of https://github.com/lamarpavel/qutebrowser into lamarpavel-test-browser-cache 2015-10-30 18:54:24 +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
Florian Bruhin
6f07eb562f Revert "Don't use faulthandler plugin for check_coverage."
This reverts commit 497fba5667.
2015-10-28 08:22:41 +01:00
Florian Bruhin
497fba5667 Don't use faulthandler plugin for check_coverage. 2015-10-28 07:45:34 +01:00
Florian Bruhin
c85aa40073 Skip connected_socket IPC tests on OS X.
Fixes #1045 - I don't have the time to look into this :-/
2015-10-26 09:04:41 +01:00
Florian Bruhin
883febe243 Return a QColor for qtutils.interpolate_color.
This broke the tests for older PyQt versions because the test had a
test_utils.Color(test_utils.Color(...)) object (double-wrapped), and the
comparisons failed there for some reason.
2015-10-26 06:45:36 +01:00
Florian Bruhin
bb5e5137cd configtypes: Allow completions for String. 2015-10-25 21:18:06 +01:00
Florian Bruhin
f614e5b98a Add none value for colors -> tabs.indicator.system. 2015-10-24 16:01:32 +02:00
Florian Bruhin
cdb9c0998f Add a comment for close() call. 2015-10-24 08:07:43 +02:00
Daniel
9722d4ba03 test_tabwidget: Make config_stub explicit
... also call TabWidget.close() at the end of the test.
2015-10-24 01:32:01 +02:00
Daniel
279d0926ee Remove unused import, make pylint happy 2015-10-23 19:52:56 +02:00
Daniel
0851999b89 Add unit/regression test 2015-10-23 19:52:56 +02: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
Daniel
ef8a681fcc Add TimestampTemplate config type
No more crash when 'completion->timestamp-format' is set to '%'.

Fixes #1039.
2015-10-21 17:23:39 +02:00
Florian Bruhin
4fb374e764 Fix test_run_vulture when frozen. 2015-10-21 06:11:07 +02:00
Florian Bruhin
aba31babca Add some tests for run_vulture.py. 2015-10-20 23:42:01 +02:00
Nathan Isom
ec3cafc293 resolve merge conflicts and merge branch scrollbar. 2015-10-18 11:42:56 -05:00
Florian Bruhin
82dfec6a18 Merge branch 'templatemagic' of https://github.com/neeasade/qutebrowser into neeasade-templatemagic 2015-10-18 18:20:41 +02:00
Nathan Isom
e92a7495c4 keep bg/fg test. 2015-10-18 10:41:15 -05:00
Nathan Isom
f1b9a3408f Remove fontdict test, edit register stylesheet test to match new font result. 2015-10-17 19:23:48 -05: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
78c57ad416 Fixed AppVeyor test 2015-10-17 18:43:14 +02:00
meles5
2398762e85 Fix tests 2015-10-17 18:29:13 +02:00
Nathan Isom
9b8b2130ef remove deprecated test. 2015-10-16 10:59:02 -05:00
Nathan Isom
2a11adc8ac initial replace pass. 2015-10-16 10:52:02 -05:00