Commit Graph

574 Commits

Author SHA1 Message Date
Florian Bruhin
0d67cff5cb Merge branch 'bdd'
Conflicts:
      tests/test_conftest.py
      tox.ini
2015-11-02 06:36:30 +01:00
Florian Bruhin
56758c8cea Ignore messages which are in qt_log_ignore. 2015-11-02 06:19:19 +01:00
Florian Bruhin
6dc3b5de36 Add some margin to wait_for stopwatch. 2015-11-02 06:11:35 +01:00
Florian Bruhin
8e09fd929b Ignore QWaitCondition error. 2015-11-02 06:10:31 +01:00
Florian Bruhin
4451165a27 Change IPC warnings to debug.
This seems to show up on Ubuntu Trusty (with older Qt) as well...
2015-11-01 23:11:42 +01:00
Florian Bruhin
b79ccb5e79 bdd: Make message matching work. 2015-11-01 22:49:39 +01:00
Florian Bruhin
dac2898585 Parse log messages in LogLine. 2015-11-01 22:49:29 +01:00
Florian Bruhin
6431997a5a Add some testprocess tests. 2015-11-01 22:48:44 +01:00
Florian Bruhin
239bc3bdea Connect read_log before starting process. 2015-11-01 22:48:44 +01:00
Florian Bruhin
dfc1782bbf Add testprocess.wait_for to react to messages. 2015-11-01 22:48:44 +01:00
Florian Bruhin
70decdc2c8 Fix lint. 2015-11-01 22:47:58 +01:00
Florian Bruhin
4b683cdd8f Check invalid logs after exiting process. 2015-11-01 22:47:58 +01:00
Florian Bruhin
1c7fd7d80e Rename testprocess cleanup to terminate. 2015-11-01 22:47:58 +01:00
Florian Bruhin
18ead66f04 Fix odd QuteProc crash. 2015-11-01 22:47:58 +01:00
Florian Bruhin
5ed419c7f5 Make reloading more reliable.
Before, we didn't wait until the reload is done, which could lead to a race
condition.
2015-11-01 22:47:58 +01:00
Florian Bruhin
2be5c4cd27 Fix lint. 2015-11-01 22:47:58 +01:00
Florian Bruhin
1a562594fa Broken error message matching. 2015-11-01 22:40:11 +01:00
Florian Bruhin
3a948be490 Add test for unexpected error logging. 2015-11-01 22:40:11 +01:00
Florian Bruhin
ac148c11ec Skip bdd tests when frozen for now.
See:

https://github.com/pytest-dev/pytest-bdd/issues/158
https://github.com/pytest-dev/pytest-bdd/issues/159
2015-11-01 22:40:11 +01:00
Florian Bruhin
b878b139dd Ignore errors when decoding subprocess output.
This would otherwise fail on Windows because … get translated to an UTF-8 NEL
(U+0085)...
2015-11-01 22:40:11 +01:00
Florian Bruhin
be20001594 Adjust log regex to parse "Unknown module". 2015-11-01 22:40:11 +01:00
Florian Bruhin
ee8d538964 Run new qutebrowser instance for each test.
The possibilities how a test can affect another are just too high.
2015-11-01 22:40:11 +01:00
Florian Bruhin
8664e45558 Use httpbin.Request namedtuple for comparisons.
This makes it easier to look at the pytest diff when things go wrong.
2015-11-01 22:40:11 +01:00
Florian Bruhin
6e786ff9b7 Open in a new tab. 2015-11-01 22:40:11 +01:00
Florian Bruhin
4bf6359205 Rename Request.url to Request.path. 2015-11-01 22:40:11 +01:00
Florian Bruhin
c052c8a107 Don't show full debug log without --verbose. 2015-11-01 22:40:11 +01:00
Florian Bruhin
af000a8ac6 Wait longer for process to start. 2015-11-01 22:40:11 +01:00
Florian Bruhin
ffc465e863 First work-in-progress feature test. 2015-11-01 22:40:11 +01:00
Florian Bruhin
7d17957e90 Ignore inspect.getargspec() warning during tests.
https://github.com/pytest-dev/pytest-bdd/issues/153
2015-11-01 22:40:11 +01:00
Florian Bruhin
76fcec4e4c tests: First steps towards end-to-end tests. 2015-11-01 22:40:11 +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
Florian Bruhin
3a522fb551 tests: Remove .close() workaround.
This is not needed anymore with pytest-qt 1.9.0.
2015-11-01 17:41:40 +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
021a379dd2 Add xfailed test for #1070. 2015-10-26 21:02: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