Commit Graph

27 Commits

Author SHA1 Message Date
Daniel Schadt
4863df5ac8 quteprocess: also mark expected WARNINGs 2016-07-02 17:19:19 +02:00
Daniel Schadt
e2b521a408 fix lint 2016-07-02 16:51:58 +02:00
Daniel Schadt
bce06d6f43 quteproc: mark expected errors as such
Fixes #1611

This marks errors that are expected by a test with an "(Expected)"
marker and white color (instead of red).

The formatting of the log messages has been deferred to _render_log,
since the .expected attribute is not correctly set right after we read
the message.
2016-07-02 13:59:46 +02:00
Florian Bruhin
d40e8e1c2f tests: Set auto-save-interval to 0
Otherwise history tests could fail because waiting for
"Saved to *history" waited for a previous line, not the newest one.

It also doesn't make any sense to save stuff anyways.
2016-06-08 21:54:44 +02:00
Florian Bruhin
483a5f8103 Fix sharing of cookie jars with private browsing
Fixes #1219
2016-06-08 16:35:43 +02:00
Florian Bruhin
8c9bd95123 test webserver: Whitelist some more HTTP statuses
- HTTP 301 for redirect-to
- HTTP 404 for status/404
2016-06-08 15:15:54 +02:00
Florian Bruhin
a9f27e3247 bdd: Turn off colors with --color=no 2016-06-06 23:19:14 +02:00
Florian Bruhin
d91f4e13d0 Fix long line 2016-06-06 17:13:56 +02:00
Florian Bruhin
2f60073cdf bdd: Allow to run invalid commands via quteproc 2016-06-06 16:10:01 +02:00
Daniel Schadt
a6b47a7c09 fix lint 2016-05-30 16:00:10 +02:00
Daniel Schadt
fa2636c2f6 tests: fix timezone issues for test_quteprocess
Depending on the timezone, you may either get 00:00 as time or 01:00,
which is bad for testing on different machines.
2016-05-30 16:00:10 +02:00
Daniel Schadt
65e5a3fe09 quteproc: match message with re.DOTALL
Since they may now contain newlines, we need to get the whole message,
which are otherwise not included in .
2016-05-30 16:00:10 +02:00
Daniel Schadt
f676a599a2 tests: remove leftover lines from writing the code
Those lines are not needed.
2016-05-30 16:00:10 +02:00
Daniel Schadt
484320ac19 quteproc: see lines starting with ' ' as error
Now that json logging is used, multiple lines should be correctly
escaped (and parsed), even in tracebacks, so this check should now be
obsolete.
2016-05-30 16:00:10 +02:00
Daniel Schadt
db240e294e quteproc: delegate LogLine to log.ColoredFormatter 2016-05-30 16:00:10 +02:00
Daniel Schadt
cc7c477e3e tests: add update tests for LogLine with json logs 2016-05-30 16:00:10 +02:00
Daniel Schadt
6a6f396f85 quteproc: set lineno to None if function is None 2016-05-30 16:00:10 +02:00
Daniel Schadt
cea32ea333 log: embed traceback in json object 2016-05-30 16:00:10 +02:00
Daniel Schadt
96b299a1fc quteproc: Nicer output for unexpected errors
Instead of
    LogLine('{"levelname": "ERROR", ...}')
we get
    21:22:34 ERROR    downloads  mhtml ...
2016-05-30 16:00:10 +02:00
Daniel Schadt
b4022b9795 quteproc: fix log_color in log message
This actually uses the escape code, not just the color name.
2016-05-30 16:00:10 +02:00
Daniel Schadt
ae16240d41 quteproc: fix docstring in formatted_str
Autocomplete was faster and inserted .strip() after line
2016-05-30 16:00:10 +02:00
Daniel Schadt
cf3930f925 quteproc: except ValueError
There is no json.decoder.JSONDecodeError, it was a lie all along...
2016-05-30 16:00:10 +02:00
Daniel Schadt
4a59a1f112 log: implement JSON as logging output
Fixes #1501

Enabled via the --json-logging parameter.
2016-05-30 16:00:10 +02:00
Florian Bruhin
d385206ea0 tests: Set some settings for quteproc
We set ui -> message-timeout to 0 to get better error messages in the
log output and network -> ssl-strict to not hang on unexpected SSL
errors.
2016-05-29 23:40:09 +02:00
Florian Bruhin
2d9cf5ed3a Handle invalid URLs in wait_for_load_finished_url 2016-05-29 22:16:55 +02:00
Florian Bruhin
119d76c502 Fix lint 2016-05-29 18:45:09 +02:00
Florian Bruhin
64d4c9f83e Clean up end2end test file structure
This renames tests/integration to tests/end2end and moves some files to
tests/end2end/fixtures.
2016-05-29 18:20:00 +02:00