Commit Graph

8090 Commits

Author SHA1 Message Date
Florian Bruhin
f5c67785c7 tox: Remove pytest-html
We don't use pytest-html anywhere anymore since switching from the
buildbot to Travis CI.
2016-05-24 15:44:39 +02:00
Florian Bruhin
153e955561 tox: Update pbr to 1.10.0 2016-05-24 15:43:09 +02:00
Florian Bruhin
40601adef0 tox: Update hypothesis to 3.2.0
All tests using @given now fix the global random seed. This removes the
health check for that. If a non-zero seed is required for the final
falsifying example, it will be reported. Otherwise Hypothesis will
assume randomization was not a significant factor for the test and be
silent on the subject. If you use the random_module() strategy this will
continue to work and will always display the seed.
2016-05-24 15:41:55 +02:00
Florian Bruhin
c6cb8e5099 Remove unneeded "# pragma: no branch" comments
Those are not needed anymore with coverage 4.1.
2016-05-24 15:40:50 +02:00
Florian Bruhin
11363b9533 Fix some invalid "# pragma: no cover" comments
We accidentally used "# pragma: no coverage" instead.
2016-05-24 15:40:18 +02:00
Florian Bruhin
002e5801f1 Improve logging in add_js_bridge 2016-05-22 14:55:53 +02:00
Florian Bruhin
4066696956 tox/requirements: Update coverage to 4.1
Version 4.1 --- 2016-05-21

- The internal attribute Reporter.file_reporters was removed in 4.1b3.
  It should have come has no surprise that there were third-party tools
  out there using that attribute. It has been restored, but with a
  deprecation warning.

Version 4.1b3 --- 2016-05-10

- When running your program, execution can jump from an except X: line
  to some other line when an exception other than X happens. This jump
  is no longer considered a branch when measuring branch coverage.
- When measuring branch coverage, yield statements that were never
  resumed were incorrectly marked as missing. This is now fixed.
- During branch coverage of single-line callables like lambdas and
  generator expressions, coverage.py can now distinguish between them
  never being called, or being called but not completed.
- The HTML report now has a map of the file along the rightmost edge of
  the page, giving an overview of where the missed lines are. Thanks,
  Dmitry Shishov.
- The HTML report now uses different monospaced fonts, favoring Consolas
  over Courier. Along the way not properly handling one-space indents
  was fixed. The index page also has slightly different styling, to try
  to make the clickable detail pages more apparent.
- Missing branches reported with coverage report -m will now say ->exit
  for missed branches to the exit of a function, rather than a negative
  number.
- coverage --help and coverage --version now mention which tracer is
  installed, to help diagnose problems. The docs mention which features
  need the C extension.
- Officially support PyPy 5.1, which required no changes, just updates
  to the docs.
- The Coverage.report function had two parameters with non-None
  defaults, which have been changed. show_missing used to default to
  True, but now defaults to None. If you had been calling
  Coverage.report without specifying show_missing, you'll need to
  explicitly set it to True to keep the same behavior. skip_covered used
  to default to False. It is now None, which doesn't change the
  behavior.
- It's never been possible to pass a namespace module to one of the
  analysis functions, but now at least we raise a more specific error
  message, rather than getting confused.
- The coverage.process_startup function now returns the Coverage
  instance it creates.
- Make a small tweak to how we compare threads, to avoid buggy custom
  comparison code in thread classes.

Version 4.1b2 --- 2016-01-23

- Problems with the new branch measurement in 4.1 beta 1 were fixed:
  - Class docstrings were considered executable. Now they no longer are.
  - yield from and await were considered returns from functions, since
    they could tranfer control to the caller. This produced unhelpful
    "missing branch" reports in a number of circumstances. Now they no
    longer are considered returns.
  - In unusual situations, a missing branch to a negative number was
    reported.
- The XML report now produces correct package names for modules found in
  directories specified with source=.
- coverage report won't produce trailing whitespace.

Version 4.1b1 --- 2016-01-10

- Branch analysis has been rewritten: it used to be based on bytecode,
  but now uses AST analysis. This has changed a number of things:
  - More code paths are now considered runnable, especially in
    try/except structures. This may mean that coverage.py will identify
    more code paths as uncovered. This could either raise or lower your
    overall coverage number.
  - Python 3.5's async and await keywords are properly supported
  - Some long-standing branch coverage bugs were fixed:
    - functions with only a docstring for a body would incorrectly
      report a missing branch on the def line.
    - code in an except block could be incorrectly marked as a missing
      branch.
    - context managers (with statements) in a loop or try block could
      confuse the branch measurement, reporting incorrect partial
      branches.
    - In Python 3.5, an actual partial branch could be marked as
      complete.
- Pragmas to disable coverage measurement can now be used on decorator
  lines, and they will apply to the entire function or class being
  decorated.
- Multiprocessing support is now available on Windows.
- Files with two encoding declarations are properly supported.
- Non-ascii characters in regexes in the configuration file worked in
  3.7, but stopped working in 4.0. Now they work again.
- Form-feed characters would prevent accurate determination of the
  beginning of statements in the rest of the file. This is now fixed.
2016-05-22 14:35:26 +02:00
Florian Bruhin
0f8b298fad Merge branch 'lahwaacz-hints_clicking' 2016-05-20 18:11:54 +02:00
Florian Bruhin
4b5788a878 Update docs 2016-05-20 18:08:46 +02:00
Florian Bruhin
a5c08e23b6 Fix path to link.html in new tests 2016-05-20 17:21:05 +02:00
Florian Bruhin
ea1f46d542 Merge branch 'hints_clicking' of https://github.com/lahwaacz/qutebrowser into lahwaacz-hints_clicking 2016-05-20 17:09:16 +02:00
Florian Bruhin
2c42219b23 Don't autofollow hint when unfiltering w/ rapid
When we are in rapid mode with only one link, after following the hint, fire()
called filter_hints(None) to display all hints again. Then filter_hints tried
to follow that link, fire() tried to show all again, etc., leading to a
RecursionError.

Fixes #1513.

A test will be added via #1510.
2016-05-20 16:41:51 +02:00
Florian Bruhin
107934e4e1 bdd: Wait a bit in "No crash should happen" step
If we don't do this, the qutebrowser process will be terminated and exit
before it actually has a chance to crash.

See #1510
2016-05-20 16:03:52 +02:00
Florian Bruhin
7898507775 tox: Update pytest-mock to 1.0.0
Fix AttributeError with mocker.spy when spying on inherited methods
2016-05-20 13:10:48 +02:00
Florian Bruhin
d67bfc8c45 Merge branch 'rcorre-keyhint_fix' 2016-05-20 13:07:47 +02:00
Florian Bruhin
b934f8bc4e Fix lint 2016-05-20 13:07:36 +02:00
Ryan Roden-Corrent
b1440a1804 Implement utils.is_special_key.
The check `key.startswith('<') and key.endswith('>') is repeated many
times in code to check for a special key. Replace all these with a call
to the same function.
2016-05-19 20:48:48 -04:00
Ryan Roden-Corrent
5992b81850 Don't show keyhint if there are no hints.
Currently, the keyhint window is shown even if the keystring matches no
possible bindings. This causes an empty keyhint window to hang around
after entering hinting mode.

Instead, the window is now hidden if no bindings match the current
keystring.

Resolves #1507.
2016-05-19 07:02:23 -04:00
Florian Bruhin
93989c035f Merge branch 'rumpelsepp-master' 2016-05-18 23:55:49 +02:00
Florian Bruhin
01e2fb37a0 Regenerate authors 2016-05-18 23:55:43 +02:00
Florian Bruhin
2b0f780500 Merge branch 'master' of https://github.com/rumpelsepp/qutebrowser into rumpelsepp-master 2016-05-18 23:55:34 +02:00
Stefan Tatschner
2c7dc6ffcc Add invalid url to 'test_set_hover_url_encoded'
This covers the recently introduced code path, in 1c23815 (Fix crash
when hovering over an invalid URL, 2016-05-18) when hovering an
invalid URL.
2016-05-18 22:23:26 +02:00
Florian Bruhin
f02bcf256b Update changelog 2016-05-18 18:49:37 +02:00
Florian Bruhin
9111d1b10f Merge branch 'rcorre-command_binding_completion' 2016-05-18 18:48:56 +02:00
Florian Bruhin
b5f8e7306f Merge branch 'command_binding_completion' of https://github.com/rcorre/qutebrowser into rcorre-command_binding_completion 2016-05-18 18:47:13 +02:00
Florian Bruhin
aef952637d Try to fix broken yelo link in README
See #1497
2016-05-18 18:43:16 +02:00
Stefan Tatschner
1c238152f7 Fix crash when hovering over an invalid URL 2016-05-18 16:20:03 +02:00
Ryan Roden-Corrent
4dd1478d2c Use ', '.join instead of str.join(', ', ...). 2016-05-18 08:55:17 -04:00
Ryan Roden-Corrent
0a0f0feaec Update command completions when keyconf changes.
When a user changes keybindings, update the command completion model so
the new keybindings are shown.
2016-05-18 08:00:21 -04:00
Ryan Roden-Corrent
c050b4973b Show special keys last in command completion.
When showing the currently bound key in the misc column for command
completion, if the command has multiple bindings, show special bindings
(e.g. <ctrl-a>) after non-special bindings.
2016-05-18 07:54:06 -04:00
Ryan Roden-Corrent
06caee41b8 Clean up command_binding_completion.
- Add a space after the comman for multiple binding suggestions.
- Use defaultdict(list) instead of defaultdict(lambda: [])
- Move the pylint comment back to the top of the class
2016-05-18 07:46:27 -04:00
Florian Bruhin
dc975cfac0 Update docs 2016-05-18 08:24:20 +02:00
Florian Bruhin
db0e29ae1d Merge branch 'rcorre-keystring' 2016-05-18 07:38:08 +02:00
Florian Bruhin
213677d30a Update changelog 2016-05-18 07:37:20 +02:00
Florian Bruhin
5b65ec17fd Set Qt.RichText textFormat for KeyHintView 2016-05-18 07:35:56 +02:00
Florian Bruhin
5c8d1656ff Fix path to test_keyhints.py in check_coverage.py
utils -> misc
2016-05-18 07:34:40 +02:00
Florian Bruhin
d0af80fbd5 Merge branch 'keystring' of https://github.com/rcorre/qutebrowser into rcorre-keystring 2016-05-18 07:33:17 +02:00
Florian Bruhin
32c7518124 Merge branch 'Liambeguin-hint_inputs' 2016-05-18 07:31:00 +02:00
Florian Bruhin
9a0083ea65 Regenerate authors 2016-05-18 07:30:54 +02:00
Florian Bruhin
324fcfadb0 Merge branch 'hint_inputs' of https://github.com/Liambeguin/qutebrowser into Liambeguin-hint_inputs 2016-05-18 07:30:46 +02:00
Florian Bruhin
d837e3eb91 Merge branch 'forkbong-pretty-hover-url' 2016-05-18 07:28:39 +02:00
Florian Bruhin
6aed55f09d Update changelog 2016-05-18 07:28:28 +02:00
Florian Bruhin
3a29abc779 Regenerate authors 2016-05-18 07:27:38 +02:00
Florian Bruhin
02cbc2f986 Merge branch 'pretty-hover-url' of https://github.com/forkbong/qutebrowser into forkbong-pretty-hover-url 2016-05-18 07:27:30 +02:00
Florian Bruhin
43518a4624 Merge branch 'timeout_docs' of https://github.com/rcorre/qutebrowser into rcorre-timeout_docs 2016-05-18 07:26:12 +02:00
Florian Bruhin
e4d84b0bfc Simplify argparser.type_check
If the value isn't param.default, it will always be a string or a flag, as
type_conv never gets called when the function is called from Python.
2016-05-18 07:16:17 +02:00
Florian Bruhin
284d4e4b97 Only pass is_bool to Command._param_to_argparse_* 2016-05-18 06:55:27 +02:00
Florian Bruhin
a83bf9c3ee Simplify argparser.type_conv
Since we're not using those functions as argparse callbacks anymore, we
can write a normal function instead of factories, which simplifies
things a lot.
2016-05-18 06:55:27 +02:00
Florian Bruhin
8ba6a0f5a7 Update CONTRIBUTING with cmdutils changes 2016-05-18 06:55:27 +02:00
Florian Bruhin
c0d044447d Add tests for qutebrowser.utils.typing 2016-05-18 06:55:17 +02:00