Commit Graph

7118 Commits

Author SHA1 Message Date
Florian Bruhin
faed088735 Wait until tabs are loaded for last-close tests. 2016-01-18 23:08:16 +01:00
Florian Bruhin
dfcd3087c2 Increase timeout for test_quteprocess_quitting. 2016-01-18 23:00:41 +01:00
Florian Bruhin
1892915146 bdd: Increase timeout for should_quit even more. 2016-01-18 22:13:24 +01:00
Florian Bruhin
8a757c8603 Release v0.5.1. 2016-01-18 22:12:52 +01:00
Florian Bruhin
9aa881faee Update changelog for v0.5.1. 2016-01-18 21:40:41 +01:00
Florian Bruhin
111f46adc5 bdd: Increase timeout for should_quit. 2016-01-18 08:11:38 +01:00
Florian Bruhin
9394f13a08 tests: Update hello.txt.html for pygments 2.1. 2016-01-18 08:11:38 +01:00
Florian Bruhin
3bf20c7c7b tests: Adjust check_contents comparison.
When doing the read() during the assert we'd get a weird pytest output which
doesn't make sense.
2016-01-18 08:11:35 +01:00
Florian Bruhin
31af303d07 tox: Update pep8 to 1.7.
We're now ready for #1226, but this only updates pep8 for now.

Changes:

* Reverted the fix, "options passed on command line are only ones accepted"
feature. This has many unintended consequences in pep8 and flake8 and needs to
be reworked when I have more time.
* Added support for Python 3.5.
* Added support for multi-line config_file option parsing.
* Improved parameter parsing.

Bugs:

* Fixed BytesWarning on Python 3.
2016-01-18 07:40:42 +01:00
Florian Bruhin
e79e01fc97 tox: Update pylint/astroid to 1.5.4/1.4.4.
pylint:

* Merge StringMethodChecker with StringFormatChecker. This fixes a
  bug where disabling all the messages and enabling only a handful of
  messages from the StringFormatChecker would have resulted in no
  messages at all.

* Don't apply unneeded-not over sets.

astroid:

* unpack_infer raises InferenceError if it can't operate
  with the given sequences of nodes.

* Support accessing properties with super().

* Enforce strong updates per frames.

  When looking up a name in a scope, Scope.lookup will return
  only the values which will be reachable after execution, as seen
  in the following code:

       a = 1
       a = 2

  In this case it doesn't make sense to return two values, but
  only the last one.
2016-01-18 07:38:34 +01:00
Florian Bruhin
eb6e0212ac requirements: Update Pygments to 2.1.
- Added lexers:
    - Emacs Lisp
    - Arduino
    - Modula-2 with multi-dialect support
    - Fortran fixed format
    - Archetype Definition language
    - Terraform
    - Jcl, Easytrieve
    - ParaSail
    - Boogie
    - Turtle
    - Fish Shell
    - Roboconf
    - Test Anything Protocol
    - Shen
    - Component Pascal
    - SuperCollider
    - Shell consoles (Tcsh, PowerShell, MSDOS)
    - Elm and J
    - Crmsh
    - Praat
    - CSound
    - Ezhil
    - Thrift
    - QVT Operational
    - Hexdump
    - CAmkES Configuration
    - Added styles:
    - Lovelace
    - Algol and Algol-nu
- Added formatters:
    - IRC
- True color (24-bit) terminal ANSI sequences (formatter alias: “16m”)
- New “filename” option for HTML formatter.
- Improved performance of the HTML formatter for long lines.
- Updated autopygmentize script.
- Fixed style inheritance for non-standard token types in HTML output.
- Added support for async/await to Python 3 lexer.
- Rewrote linenos option for TerminalFormatter (it’s better, but slightly
  different output than before).
- Javascript lexer now supports most of ES6.
- Cocoa builtins updated for iOS 8.1.
- Combined BashSessionLexer and ShellSessionLexer, new version should support
  the prompt styles of either.
- Added option to pygmentize to show a full traceback on exceptions.
- Fixed incomplete output on Windows and Python 3 (e.g. when using iPython
  Notebook).
- Allowed more traceback styles in Python console lexer.
- Added decorators to TypeScript.
- Fix highlighting of certain IRC logs formats.
2016-01-18 07:35:46 +01:00
Florian Bruhin
3864ae8aae bdd: Wait until page is loaded (last-close tests). 2016-01-18 07:33:17 +01:00
Florian Bruhin
c8538bdbb8 Fix config validation for String types.
Fixes #1231.
2016-01-18 07:29:15 +01:00
Florian Bruhin
f7784e641e bdd: Add some tests for tabs -> last-close. 2016-01-18 07:08:07 +01:00
Florian Bruhin
d6fafd474b pylint: Disable no-member for http.client.*
Seems like this is potentially the same issue as
https://github.com/PyCQA/pylint/issues/399, it also happens on the same
machines.
2016-01-17 21:27:24 +01:00
Florian Bruhin
0936ed4e61 Disable useless-suppression in webserver_sub_ssl.
Seems like this pylint bug doesn't happen on all systems...
2016-01-17 21:21:26 +01:00
Florian Bruhin
11dc51031d tests: Increase timeout for quteprocess_quitting. 2016-01-17 21:20:28 +01:00
Florian Bruhin
9c5974c054 bdd: Add a "qutebrowser should quit" step. 2016-01-17 20:59:39 +01:00
Florian Bruhin
6e390bdc01 tests: Add a quteproc test for quitting. 2016-01-17 20:46:55 +01:00
Florian Bruhin
6c5e158fc5 tests: Add a test for a quitting testprocess. 2016-01-17 20:19:41 +01:00
Florian Bruhin
dd211adf0f tests: Make sure testprocess raises if start fails. 2016-01-17 20:18:07 +01:00
Florian Bruhin
b2dbd8baef Merge branch 'Link-Satonaka-patch-1' 2016-01-15 07:53:11 +01:00
Florian Bruhin
fba78945a4 Regenerate authors. 2016-01-15 07:53:05 +01:00
Florian Bruhin
7780fde62f Use different headers. 2016-01-15 07:53:01 +01:00
Florian Bruhin
be903e0c2f Merge branch 'patch-1' of https://github.com/Link-Satonaka/qutebrowser into Link-Satonaka-patch-1 2016-01-15 07:50:23 +01:00
Florian Bruhin
79cf6fa095 Merge branch 'Evidlo-master' 2016-01-15 07:48:37 +01:00
Florian Bruhin
b859bde9dc Regenerate authors. 2016-01-15 07:42:56 +01:00
Florian Bruhin
f1c31233c8 Merge branch 'master' of https://github.com/Evidlo/qutebrowser into Evidlo-master 2016-01-15 07:42:47 +01:00
Florian Bruhin
6774894e9e tests: Check HTTP server status per path.
Stricter and simpler, ha! :)
2016-01-15 07:13:45 +01:00
Florian Bruhin
9d520b7312 Avoid trying to load .netrc if $HOME isn't set.
This logged an error on Windows:

ERROR    misc       networkmanager:on_authentication_required:269 Unable to read the netrc file
Traceback (most recent call last):
  File "c:\python34\Lib\netrc.py", line 27, in __init__
    file = os.path.join(os.environ['HOME'], ".netrc")
  File "C:\Users\florian\buildbot\slave\win8\build\.tox\py34\lib\os.py", line 633, in __getitem__
    raise KeyError(key) from None
KeyError: 'HOME'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\florian\buildbot\slave\win8\build\qutebrowser\browser\network\networkmanager.py", line 262, in on_authentication_required
    net = netrc.netrc()
  File "c:\python34\Lib\netrc.py", line 29, in __init__
    raise OSError("Could not find .netrc: $HOME is not set")

Since this case is pretty common, we don't want to log it - and checking the
variable beforehand is easier than parsing the exception message.

This should fix the failing tests on Windows.
2016-01-15 06:57:43 +01:00
Florian Bruhin
40721a2b6b bdd: Wait until basic-auth page is fully loaded.
This hopefully fixes this flakyness in
test_successful_webpage_authentification:

    tests/integration/features/test_prompts.py:129:
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    [...]
    tests/integration/features/conftest.py:381: in check_contents_json
	actual = json.loads(content)
    /usr/lib/python3.4/json/__init__.py:318: in loads
	return _default_decoder.decode(s)
    /usr/lib/python3.4/json/decoder.py:343: in decode
	obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    [...]
    >           raise ValueError(errmsg("Expecting value", s, err.value)) from None
    E           ValueError: Expecting value: line 1 column 1 (char 0)
2016-01-15 06:51:48 +01:00
Florian Bruhin
6420cdaa26 bdd: Open geolocation/notification page in new tab
This hopefully fixes this flaky error in test_notifications_with_ask__true on
OS X:

    Failed: Logged unexpected errors:

    LogLine('22:40:06 DEBUG    js         webpage:javaScriptConsoleMessage:531 [http://localhost:57758/data/prompt/notifications.html:28] [FAIL] unknown initial value for Notification.permission: denied')
    [...]
    testprocess.WaitForTimeout: Timed out after 15000ms waiting for {'message': 'Entering mode KeyMode.* (reason: question asked)'}.
2016-01-15 06:44:01 +01:00
evan
982ac5150d issue 1213: Display yanked link in statusbar
copied string format from `yank()` in `commands.py`
2016-01-14 19:17:12 -05:00
Florian Bruhin
5856b24d20 bdd: Compare HTTP status to a whitelist.
401 (authorization required) is not < 400, and it makes more sense to be strict
here anyways.
2016-01-14 22:34:26 +01:00
Florian Bruhin
cda6d7c06d bdd: Add test for webpage authentication. 2016-01-14 22:27:09 +01:00
Florian Bruhin
573654ece1 bdd: Add check_contents_json. 2016-01-14 22:27:00 +01:00
Florian Bruhin
c79f013050 bdd: Allow to load a page without waiting for it. 2016-01-14 22:26:42 +01:00
Florian Bruhin
23107a242b bdd: Ignore POSITION_UNAVAILABLE for geolocation. 2016-01-14 20:40:46 +01:00
Florian Bruhin
0b116729f7 bdd: Fix skipping tests from JS.
With the previous solution, we'd call pytest.skip on teardown only, which means
the rest of the test (e.g. because of a wait_for) could still fail.
2016-01-14 20:32:17 +01:00
Florian Bruhin
d4e2ece38b bdd: Ignore QGeoClue errors.
The geolocation tests emitted those errors on the Archlinux buildbot:

    QGeoclueMaster error creating GeoclueMasterClient.
    Geoclue error: Process org.freedesktop.Geoclue.Master exited with status 127

I don't really know what they mean, but let's see if the test passes now.
2016-01-14 19:06:36 +01:00
Florian Bruhin
b8a50dc475 bdd: Log error code on geolocation errors. 2016-01-14 19:04:48 +01:00
Florian Bruhin
e7a816c0c0 bdd: Skip geolocation tests if it's unavailable.
This should unbreak the build with older Qt versions.
2016-01-14 18:51:28 +01:00
Florian Bruhin
9c87eaf371 bdd: Allow to skip a test from JS.
This is a bit tricky since the test will actually run, but be marked as
skipped. The problem is we can't raise a pytest.skip.Exception during a test,
or it'll show up as an exception in a virtual Qt method.

Still this is better than nothing.
2016-01-14 18:50:36 +01:00
Florian Bruhin
14ff684e99 bdd: Add a xfail_norun marker. 2016-01-14 07:53:00 +01:00
Florian Bruhin
cf09e477a4 bdd: Add some tests for HTML5 notifications. 2016-01-14 07:49:39 +01:00
Florian Bruhin
1ddf817f4c bdd: Add some tests for geolocation. 2016-01-14 07:30:52 +01:00
Florian Bruhin
252dc5bf1b bdd: Add ability to fail tests from javascript. 2016-01-14 07:03:55 +01:00
Florian Bruhin
1d63e2dff4 bdd: Make "I wait for a prompt" step explicit. 2016-01-14 07:03:55 +01:00
Link
2e281a19d3 bullets 2016-01-13 17:51:21 -05:00
Link
082a910250 words 2016-01-13 17:50:02 -05:00