Commit Graph

6184 Commits

Author SHA1 Message Date
Florian Bruhin
30db09bbda tox: Update pyroma to 1.8.3.
- Checking a PyPI package could fail under Python 3.
2015-11-09 09:46:02 +01:00
Florian Bruhin
0daf5885be Add some BDD tests for downloads. 2015-11-09 07:49:11 +01:00
Florian Bruhin
b59a56921e Fix crashes with downloads in a closed tab.
When a download was redirected or failed after a tab was closed, there was a
KeyError in the object registry.

Fixes #889. This is a regression introduced in
976f758da1 / #731.
2015-11-09 07:46:22 +01:00
Florian Bruhin
89c0ff0d9b bdd: Add a redirect-later page in webserver_sub.
This is needed for download tests.
2015-11-09 07:46:03 +01:00
Florian Bruhin
021ea444a1 bdd: Fix separations between tests.
With this change, no test should affect another one anymore. Changes in detail:

- Before each test, invalid lines are cleaned so the invalid output from the
  previous test doesn't affect the next one.
- Before each test, qutebrowser is restarted if it was quit.
- After each test, the data is cleared properly in every case.
- If there was an invalid output, the test waits for 1s for more output, and
  then terminates qutebrowser so it's restarted with a clean state.
2015-11-09 07:43:48 +01:00
Florian Bruhin
8b016df023 bdd: Make InvalidLine show some more informations. 2015-11-09 07:41:57 +01:00
Florian Bruhin
62f11273c5 tests: Fix quteproc.after_test() fixture.
It accidentally was named wrong, which caused it to never be executed. That
means the teardown log wasn't actually checked for errors.
2015-11-09 07:40:25 +01:00
Florian Bruhin
64730f566f tests: Make wait for loading work with downloads. 2015-11-09 07:39:24 +01:00
Florian Bruhin
8aa29a2ba2 bdd: Fix assert in "The requests should be" step.
When we call get_requests() inside the assertion, it won't act the same when
reinterpreting it.
2015-11-09 07:38:34 +01:00
Florian Bruhin
a05da2a956 bdd: Add a "then no crash should happen" step.
This is actually just a NOP, but helps in writing nice sentences ;)
2015-11-09 07:37:52 +01:00
Florian Bruhin
ae0e391c04 bdd: Add a "When I wait for the message ..." step. 2015-11-09 07:37:23 +01:00
Florian Bruhin
56bdb74ed9 bdd: Allow (port) replacement in "When I run ...". 2015-11-09 07:37:04 +01:00
Florian Bruhin
9dfe84c197 Accept longer URL in WebView repr before eliding.
This broke bdd tests because … was inserted in the log.
2015-11-09 07:36:10 +01:00
Florian Bruhin
9cfd96fcef Make :follow-hint take a keystring. 2015-11-09 07:35:56 +01:00
Florian Bruhin
c1c5b0f2b4 Fix prompt for download directory when turned off. 2015-11-09 07:35:03 +01:00
Florian Bruhin
95483f73d8 Add some assertions to DownloadItem.retry. 2015-11-09 07:34:49 +01:00
Florian Bruhin
612174ada0 Add a :download-retry command.
Closes #1097.
2015-11-09 07:17:54 +01:00
Florian Bruhin
19a9985f0d Update changelog. 2015-11-09 07:16:55 +01:00
Florian Bruhin
4c2e92c998 Make testprocess test more stable. 2015-11-06 07:17:15 +01:00
Florian Bruhin
25ecd9068c tests: Don't wait for the same line twice.
We need to search for lines in the history because we could miss something
otherwise, but for subsequent wait_for calls, we really don't want to wait for
the same thing again.

This should make test_backforward.py more stable as it *actually* waits when
going back now. Before, it did produce failures such as this one on OS X:

____________________________ test_going_backforward ____________________________
[..]
    @bdd.then(bdd.parsers.parse("The requests should be:\n{pages}"))
    def list_of_loaded_pages(httpbin, pages):
        requests = [httpbin.Request('GET', '/' + path.strip())
                    for path in pages.split('\n')]
>       assert httpbin.get_requests() == requests
E       assert [Request(verb...rward/1.txt')] == [Request(verb=...rward/2.txt')]
E         At index 3 diff: Request(verb='GET', path='/data/backforward/1.txt') != Request(verb='GET', path='/data/backforward/2.txt')
E         Full diff:
E         [Request(verb='GET', path='/data/backforward/1.txt'),
E         Request(verb='GET', path='/data/backforward/2.txt'),
E         Request(verb='GET', path='/data/backforward/1.txt'),
E         -  Request(verb='GET', path='/data/backforward/1.txt')]
E         ?                                              ^
E         +  Request(verb='GET', path='/data/backforward/2.txt')]
E         ?                                              ^
tests/integration/features/conftest.py:85: AssertionError
2015-11-06 07:02:17 +01:00
Florian Bruhin
f5f74b7ddc tests: Use a base class for testprocess lines. 2015-11-06 07:02:17 +01:00
Florian Bruhin
da88908815 Fix deprecation warning when clearing downloads. 2015-11-06 07:02:17 +01:00
Florian Bruhin
3fcc27636a Improve documentation for general -> editor. 2015-11-06 07:02:17 +01:00
Florian Bruhin
5541e3ed32 bdd: Wait until title is loaded in yankpaste. 2015-11-05 08:03:03 +01:00
Florian Bruhin
b0430ca3e7 bdd: Make it possible to wait for messages. 2015-11-05 08:02:55 +01:00
Florian Bruhin
547fc9f40e Simplify testprocess tests. 2015-11-05 07:40:10 +01:00
Florian Bruhin
10e52c6e9f Make testprocess test more robust. 2015-11-05 07:39:31 +01:00
Florian Bruhin
bf74fda5b2 Fix lint. 2015-11-05 07:33:32 +01:00
Florian Bruhin
76f5f4fefb bdd: Remove now unnecessary sleep. 2015-11-05 07:07:43 +01:00
Florian Bruhin
beab639d7a bdd: Wait for finished loads in backforward. 2015-11-05 07:07:43 +01:00
Florian Bruhin
924b0052c6 bdd: Match historic messages in wait_for.
Fixes #1083.
2015-11-05 07:07:43 +01:00
Florian Bruhin
6c718bc839 travis: Show (folded) coverage report. 2015-11-04 23:22:56 +01:00
Florian Bruhin
8ccadda0e9 tox: Update pytest-travis-fold to 1.2.0.
- Recognize 'pytest-cov' and fold coverage report
2015-11-04 23:15:51 +01:00
Florian Bruhin
5fc26bc477 tox: Update coverage to 4.0.2.
- More work on supporting unusually encoded source.
- Files or directories with non-ASCII characters are now handled properly.
- Setting a trace function with sys.settrace was broken by a change in 4.0.1.
- Officially support PyPy 4.0, which required no changes, just updates to the
  docs.
2015-11-04 17:59:46 +01:00
Florian Bruhin
59bc72cfbb Merge branch 'NoctuaNivalis-master' 2015-11-04 17:46:03 +01:00
Florian Bruhin
58c5b52ff3 Update docs. 2015-11-04 17:45:33 +01:00
Florian Bruhin
ac10fbc095 Handle qute:... handlers in run_vulture. 2015-11-04 17:45:16 +01:00
Florian Bruhin
939e95b344 Add missing decorator for qute:version. 2015-11-04 17:45:12 +01:00
Florian Bruhin
3525659b90 Fix pep8 issues. 2015-11-04 17:41:33 +01:00
Florian Bruhin
4e8cf70c10 Merge branch 'master' of https://github.com/NoctuaNivalis/qutebrowser into NoctuaNivalis-master 2015-11-04 17:19:00 +01:00
Felix Van der Jeugt
8354894838 rename the add_handler function everywhere 2015-11-04 09:49:46 +01:00
Florian Bruhin
af3318e72a doc: Clarify where to run tox.
Fixes #1087.
2015-11-04 09:45:48 +01:00
Florian Bruhin
c383b42af3 Merge branch 'forkbong-master' 2015-11-04 07:14:09 +01:00
Florian Bruhin
38756fc466 Update docs. 2015-11-04 07:12:44 +01:00
Florian Bruhin
6c20190473 Merge branch 'master' of https://github.com/forkbong/qutebrowser into forkbong-master 2015-11-04 07:12:32 +01:00
Florian Bruhin
702842c977 configtypes: Handle max. recursion depth for Regex. 2015-11-04 07:02:23 +01:00
Panagiotis Ktistakis
782f09488a Deprecate :download-remove --all.
:download-clear should be used instead.
2015-11-04 01:06:39 +02:00
Panagiotis Ktistakis
dc06787f83 Make key config migration for clearing downloads. 2015-11-04 01:01:27 +02:00
Felix Van der Jeugt
896ac0a7e9 fix the comments on style/typos 2015-11-03 23:15:07 +01:00
Felix Van der Jeugt
84c498b638 use global variable in place of class variable 2015-11-03 23:12:38 +01:00