Commit Graph

7257 Commits

Author SHA1 Message Date
Florian Bruhin
8c6c976afc tox: Update pytest-html to 1.8.0.
- Remove duplication from the environment section
- Dropped support for Python 3.2
- Indicated setup and teardown in report
- Fixed colour of errors in report
2016-02-24 20:14:14 +01:00
Florian Bruhin
2dfce20602 tox: Update hypothesis to 3.0.4.
- Fix version parsing of py.test to work with py.test release candidates
- More general handling of the health check problem where things could fail
  because of a cache miss - now one "free" example is generated before the start
  of the health check run.
- Fix a bug where Hypothesis would error when running on Python 2.7.3 or earlier
  because it was trying to pass a bytearray object to struct.unpack (which is
  only supported since 2.7.4).
2016-02-24 20:11:40 +01:00
Florian Bruhin
0df4da5b91 Also display XDG_* in crash reports 2016-02-23 08:47:53 +01:00
Florian Bruhin
92ea15cc7a Merge branch 'NoctuaNivalis-fix/ellipses-on-fullscreen' 2016-02-22 11:50:50 +01:00
Florian Bruhin
609d9b9a25 Regenerate authors. 2016-02-22 11:50:38 +01:00
Florian Bruhin
3ff419f685 Merge branch 'fix/ellipses-on-fullscreen' of https://github.com/NoctuaNivalis/qutebrowser into NoctuaNivalis-fix/ellipses-on-fullscreen 2016-02-22 11:50:26 +01:00
Florian Bruhin
f64916b516 Only run geolocation tests on CI
Trying to get the device location while running the tests can trigger all kind
of funny effects.

Since we can't easily mock the GPS responses, we only run those on the CI where
we at least have some predictable setup.

Fixes #1297.
2016-02-21 17:24:33 +01:00
Florian Bruhin
513e4d5236 Switch to flake8-docstrings with pydocstyle
We used to use flake8-pep257 because docstrings claims no codes are ignorable
(which is wrong). However, that doesn't work with pydocstyle, so we had a
separate pydocstyle environment (and flake8-pep257 to check tests with relaxed
rules).

Now we only use flake8-docstrings + pydocstyle (which it switches to if it's
available, even though it still depends on pep257), and drop the pydocstyle tox
env.

As soon as flake8-docstrings is updated to drop the (unneeded) pep257
dependency, we can drop it as well.
2016-02-19 18:05:51 +01:00
Florian Bruhin
d0e79b2af7 Fix lint 2016-02-19 07:39:17 +01:00
Florian Bruhin
0b362e76ea Move pylint plugins to an installed package.
This means we can now run things like running pylint --version without having
to set PYTHONPATH correctly now.

When using skip_install=true, the plugins wouldn't work as they need to import
qutebrowser.

We have to keep setting PYTHONPATH in run_pylint_on_tests.py, otherwise we get
this error I don't quite understand:

    F:  1, 0: error while code parsing: Unable to load file
    '/home/florian/proj/qutebrowser/git/__init__.py' ([Errno 2] No such
    file or directory: '...') (parse-error)
2016-02-19 07:15:09 +01:00
Florian Bruhin
67b9904772 Include pytest-xvfb properly in frozen tests 2016-02-19 06:52:19 +01:00
Florian Bruhin
b201b65669 tests: Handle trailing / in wait_for_load_finished.
We actually already added that in 16ec035418, but
in 9a02dc174d we accidentally dropped it again.
2016-02-19 06:42:23 +01:00
Florian Bruhin
6a077f5d5a Fix lint. 2016-02-18 21:38:23 +01:00
Florian Bruhin
0c4a961505 tox: Upgrade hypothesis to 3.0.2.
(3.0.2: performance fix)

------------------
3.0.1 - 2016-02-18
------------------

* Fix a case where it was possible to trigger an "Unreachable" assertion when
  running certain flaky stateful tests.
* Improve shrinking of large stateful tests by eliminating a case where it was
  hard to delete early steps.
* Improve efficiency of drawing binary(min_size=n, max_size=n) significantly by
  provide a custom implementation for fixed size blocks that can bypass a lot
  of machinery.
* Set default home directory based on the current working directory at the
  point Hypothesis is imported, not whenever the function first happens to be
  called.

------------------
3.0.0 - 2016-02-17
------------------

Codename: This really should have been 2.1.

Externally this looks like a very small release. It has one small breaking change
that probably doesn't affect anyone at all (some behaviour that never really worked
correctly is now outright forbidden) but necessitated a major version bump and one
visible new feature.

Internally this is a complete rewrite. Almost nothing other than the public API is
the same.

New features:

* Addition of data() strategy which allows you to draw arbitrary data interactively
  within the test.
* New "exploded" database format which allows you to more easily check the example
  database into a source repository while supporting merging.
* Better management of how examples are saved in the database.
* Health checks will now raise as errors when they fail. It was too easy to have
  the warnings be swallowed entirely.

New limitations:

* choices and streaming strategies may no longer be used with find(). Neither may
  data() (this is the change that necessitated a major version bump).

Feature removal:

* The ForkingTestCase executor has gone away. It may return in some more working
  form at a later date.

Performance improvements:

* A new model which allows flatmap, composite strategies and stateful testing to
  perform *much* better. They should also be more reliable.
* Filtering may in some circumstances have improved significantly. This will
  help especially in cases where you have lots of values with individual filters
  on them, such as lists(x.filter(...)).
* Modest performance improvements to the general test runner by avoiding expensive
  operations

In general your tests should have got faster. If they've instead got significantly
slower, I'm interested in hearing about it.

Data distribution:

The data distribution should have changed significantly. This may uncover bugs the
previous version missed. It may also miss bugs the previous version could have
uncovered. Hypothesis is now producing less strongly correlated data than it used
to, but the correlations are extended over more of the structure.

Shrinking:

Shrinking quality should have improved. In particular Hypothesis can now perform
simultaneous shrinking of separate examples within a single test (previously it
was only able to do this for elements of a single collection). In some cases
performance will have improved, in some cases it will have got worse but generally
shouldn't have by much.
2016-02-18 20:46:15 +01:00
Florian Bruhin
36b0e304fc tests: Add first end-to-end test for hints.
This is based on HTML files with a global YAML comment, currently with "target"
as the only allowed key.

The tests then do this:

- Open a HTML file in data/hints/html
- Start hinting
- Make sure only one hint is visible
- Follow it, and make sure the page mentioned in "target:" is reached

Some ideas for the future:

- A "scroll" key, to scroll before hinting
- A "zoom" key, to zoom
- Multiple hints via a list
- Checking position of hints?
- A mode to manually check the pages (to check hint positions)
2016-02-18 20:46:15 +01:00
Florian Bruhin
9b1db7ec0b hints: Log the used hint chars
Useful for debugging and for end2end tests.
2016-02-18 20:46:15 +01:00
Florian Bruhin
9a02dc174d bdd: use quteproc.wait_for_load_finished.
Why duplicate that logic?
2016-02-18 20:46:15 +01:00
Florian Bruhin
504bf6eb3b Remove xvfbwrapper from freeze_tests.py. 2016-02-17 07:45:36 +01:00
Florian Bruhin
ae7cbb6dce Merge branch 'arsana7-master' 2016-02-17 07:10:22 +01:00
Florian Bruhin
7ba6752020 Regenerate authors. 2016-02-17 07:10:14 +01:00
Florian Bruhin
2b2331754d Combine launch/crash time into one section. 2016-02-17 07:10:01 +01:00
Florian Bruhin
36019c0cab Split long lines. 2016-02-17 07:04:25 +01:00
Florian Bruhin
116ab5429a Merge branch 'master' of https://github.com/arsana7/qutebrowser into arsana7-master 2016-02-17 07:03:17 +01:00
Florian Bruhin
5c617b861c Switch to pytest-xvfb. Fixes #1309. 2016-02-16 20:36:23 +01:00
Felix Van der Jeugt
c52e93e296 no ellipsis is inserted in big windows 2016-02-15 22:52:28 +01:00
Florian Bruhin
aad8dfc0ce Merge branch 'NoctuaNivalis-fix/#1308' 2016-02-15 22:08:50 +01:00
Florian Bruhin
9a18bc4ced Regenerate authors. 2016-02-15 22:08:42 +01:00
Florian Bruhin
aa579d76c9 Merge branch 'fix/#1308' of https://github.com/NoctuaNivalis/qutebrowser into NoctuaNivalis-fix/#1308 2016-02-15 22:08:33 +01:00
Felix Van der Jeugt
60c2b9c0b2 fixes #1308 2016-02-15 21:59:09 +01:00
Florian Bruhin
ff779ef329 Update .eslintrc for eslint 2.0. 2016-02-15 07:52:51 +01:00
Florian Bruhin
74e168c339 Update Pygments test file. 2016-02-15 07:47:29 +01:00
Florian Bruhin
3aaa4395b8 tox: Update Werkzeug to 0.11.4.
- Fixed werkzeug.serving not working from -m flag.
- Fixed incorrect weak etag handling.
2016-02-15 07:08:31 +01:00
Florian Bruhin
f8cfdf0623 requirements: Update Pygments to 2.1.1.
- Fixed Jython compatibility
- Fixed HTML formatter output with leading empty lines
- Added a mapping table for LaTeX encodings and added utf8
- Fixed image formatter font searching on Macs
- Fixed deepcopy-ing of Token instances
- Fixed Julia string interpolation
- Fixed statefulness of HttpLexer between get_tokens calls
- Many smaller fixes to various lexers
2016-02-15 07:07:34 +01:00
avk
d551591b42 Added crash time to crash report 2016-02-12 11:59:45 +01:00
avk
53719366e0 Added time to standard log 2016-02-12 11:02:08 +01:00
Florian Bruhin
5c53cf0054 Merge branch 'flv0-contributing-toxhelp' 2016-02-12 06:43:31 +01:00
Florian Bruhin
0c0a624b5c Regenerate authors. 2016-02-12 06:43:22 +01:00
Florian Bruhin
07492db9fe Merge branch 'contributing-toxhelp' of https://github.com/flv0/qutebrowser into flv0-contributing-toxhelp 2016-02-12 06:43:10 +01:00
Florian Bruhin
8534010f02 tox: Update flake8 to 2.5.4.
Actually parse output_file and enable_extensions from config files.
2016-02-11 19:29:05 +01:00
Florian Bruhin
5b66d81f7d Include pstats for frozen tests. 2016-02-11 08:26:31 +01:00
Florian Bruhin
02f367a308 Add basic profiling capability for quteproc tests.
When --qute-profile-subprocs is given, we write a profile file for each
qutebrowser invocation and also create prof/combined.pstats afterwards.
2016-02-11 08:02:44 +01:00
Florian Bruhin
6d11e9ffd8 Fix lint. 2016-02-11 07:17:00 +01:00
Florian Bruhin
45935c86af Rewrite run_profile script.
There's now --profile-tool to select between various tools, a new
--profile-file option, and it uses argparse.
2016-02-11 06:48:16 +01:00
Patric Schmitz
e4c8bd98cd minor CONTRIBUTION fixes (utils renaming) 2016-02-10 23:01:50 +01:00
Patric Schmitz
c0cc3f3842 refining toxhelp PR. added a newline as well. 2016-02-10 22:12:48 +01:00
Florian Bruhin
5311576c34 Check pep257 via flake8.
We'll still keep the pydocstyle environment though until flake8-pep257 adds
support for that:

https://github.com/Robpol86/flake8-pep257/issues/6
2016-02-10 19:18:47 +01:00
Patric Schmitz
5878cd37fa add CONTRIBUTING to index and asciidoc2html.py 2016-02-10 18:37:46 +01:00
Patric Schmitz
c429991f88 update checkers list, add 'Running Specific Tests' 2016-02-10 18:37:07 +01:00
Florian Bruhin
7f791dfcb8 Remove now obsolete test. 2016-02-10 07:06:34 +01:00
Florian Bruhin
b6f1dd963d Handle Shift-Insert correctly in prompt mode.
Fixes #1299.
2016-02-10 06:40:54 +01:00