Florian Bruhin
f6c36ccbee
Rename openurl to load_url
...
We still call the :open command openurl, but in the tab API and in
TabbedBrowser it's now called load_url.
2018-11-30 08:31:03 +01:00
Florian Bruhin
b7de287e7b
Move CommandError to api.cmdutils
2018-11-29 14:18:11 +01:00
Florian Bruhin
19628d0ae9
Move cmdutils.cmd_dict to objects.commands
2018-11-29 14:18:11 +01:00
Florian Bruhin
14fe7f9b0b
pass fixup
2018-11-28 12:58:48 +01:00
Florian Bruhin
2453134011
Remove unnecessary pass statements
2018-11-28 12:51:53 +01:00
Florian Bruhin
3b8964183e
Use caplog.messages
2018-10-24 10:57:17 +02:00
Florian Bruhin
bee04a1eec
Wait until runner is finished in test_custom_env
...
This seems to at least lead to less warnings when running the test.
2018-03-19 11:43:08 +01:00
Florian Bruhin
6f028e9ad0
Update copyright years
2018-02-05 12:19:50 +01:00
Florian Bruhin
f4ed31b295
Add an utils.Unreachable exception
2017-12-15 16:33:47 +01:00
Ryan Farley
5ed8019115
update flake8 and flake8-deprecated
...
Updated requirements and adjusted the configuration in `.flake8`; other
files have been modified where the lack of per-file auto-ignore caused
problems, where putty's `# flake8: disable=` syntax could be replaced
with a simpler `noqa`, or where pylint directives already suppressed the
same error.
2017-11-26 00:16:14 -06:00
Florian Bruhin
f6cc6677dd
Remove hiding of commands
...
This was often confusing for people - let's instead just hide commands which are
not available in normal mode.
2017-11-13 09:02:16 +01:00
Florian Bruhin
be08cee63c
Make testsuite work with LC_ALL=C
2017-11-07 17:23:38 +01:00
Gyorgy Orban
98c6b49cde
use enum module instead or usertypes.enum
...
Remove the usertypes.enum from the source and use
the standard enum module instead.
Enum start number is available since python 3.5
2017-11-02 18:56:11 +01:00
Florian Bruhin
4f263505ee
Improve tests for partial matching
2017-10-17 11:49:46 +02:00
Florian Bruhin
52423fa426
Remove unneeded variable
2017-10-17 11:37:19 +02:00
Luca Benci
c8d41a4f87
Make tests pass
2017-10-10 22:54:49 +02:00
Luca Benci
052c527e4c
Avoid explicit config monkeypatching
2017-10-10 22:52:57 +02:00
Luca Benci
787e3db3d5
Move tests to test_runners.py
2017-10-10 22:51:40 +02:00
Florian Bruhin
6037d44d0e
Remove unused imports
2017-10-04 08:56:32 +02:00
Florian Bruhin
7cbb2b079f
Use existing tabbed_browser_stubs fixture in tests
2017-10-04 06:35:42 +02:00
Florian Bruhin
10016ae240
Remove unused import
2017-09-22 08:23:06 +02:00
Florian Bruhin
c652b0f96c
Remove old monkeypatch
2017-09-21 23:59:16 +02:00
Florian Bruhin
46cfd5353d
Use a pytest marker to fake an OS
2017-09-20 11:30:18 +02:00
Florian Bruhin
ef1c83862b
Use utils.is_* for platform checks everywhere
2017-09-20 11:10:24 +02:00
Florian Bruhin
505321c336
Drop support for Python 3.4
...
See #2742
2017-09-18 23:01:17 +02:00
Florian Bruhin
fa4ea912c9
Get rid of init_standarddir fixture
...
Instead, always patch in tmpdir's so we don't write to qute_test folders.
2017-09-15 14:30:46 +02:00
Florian Bruhin
56bbd73622
Introduce standarddir caching
...
This makes things a bit more complicated, but is needed to make standarddir (and
thus the config) work without a QApplication.
2017-09-13 17:26:56 +02:00
Florian Bruhin
cff61fa0bc
Fix pylint
...
This also reverts commit 8df0b063be
.
2017-07-04 15:34:10 +02:00
Florian Bruhin
22b0f2fd24
Various simple test updates for new config
...
test_cache
test_cookies
test_webkitelem
test_cmdutils
test_runners
test_completionwidget
test_messageview
test_editor
test_miscwidgets
test_sessions
test_urlutils
test_utils
test_prompt
statusbar/test_*
test_cmdhistory
test_tabwidget
test_tab
test_downloads
test_networkmanager
2017-07-04 15:08:04 +02:00
Florian Bruhin
978013e750
Fix CommandParser and don't use a generator
2017-07-04 15:08:03 +02:00
Florian Bruhin
ac78039171
Use aliases for :w and :q
2017-07-04 15:08:03 +02:00
Florian Bruhin
994e8c692f
Merge different FakeTabbedBrowser objects
2017-06-20 15:19:53 +02:00
Florian Bruhin
0f3a17ae88
Fix raw string prefix
2017-05-23 10:09:06 +02:00
Florian Bruhin
ea2fbc427a
tests: Use match= for pytest.raises
2017-05-23 09:36:00 +02:00
Florian Bruhin
822623f2ed
Finally update copyrights...
2017-05-09 21:37:03 +02:00
Florian Bruhin
b1a95a3930
Add automatic backend selection in earlyinit
2017-02-05 17:09:04 +01:00
Florian Bruhin
de50f30b9b
Replace all GitHub links
2017-02-05 00:13:11 +01:00
Florian Bruhin
d9c8bd7fca
Add a test for userscript unicode errors
2016-12-28 23:03:46 +01:00
Florian Bruhin
552e0551af
Revert zero counts
...
This initially seemed like a nice feature, but it means 0 can't be bound
as a separate key anymore, and 0<Esc> gives weird error messages...
Reverts #1953 .
Fixes #2032 .
2016-11-23 08:37:29 +01:00
Ryan Roden-Corrent
fbc084e416
Remove :<count>:cmd syntax support.
...
CommandRunner.parse had some logic for handling commands of form
:<count>:cmd. However, this complicated the parsing logic for something
that appears to only be used in tests. One could use it in a
userscript, but this is unlikely as it is undocumented. Removing
support for this simplifies the logic of parse.
The commnd `run-with-count` is added to provide this functionality.
It works like `repeat` but passes the count along to the command
instead of running the command multiple times.
This resolves #1997 : Qutebrowser crashes when pasting commands.
This bug was caused by excess stripping of ':' from the command string
by _parse_count.
2016-10-10 08:02:30 -04:00
Florian Bruhin
6b76d5defa
Whitespace changes
2016-09-30 17:54:23 +02:00
Florian Bruhin
822c100f52
Make 0 a usable count for :tab-focus
...
Fixes #1768
2016-09-30 08:33:16 +02:00
Florian Bruhin
d0d3245d48
Remove extra blank line
2016-09-15 17:19:53 +02:00
Daniel Schadt
eabfdb3c16
tests: make sure the type error is the one we want
2016-09-15 16:42:02 +02:00
Daniel Schadt
b6d9d3f955
fix tests for new "default required" policy
...
This test had a keyword only parameter without a default, which is now
disallowed. This caused the test to fail.
2016-09-15 15:46:26 +02:00
Daniel Schadt
0ef5d338bd
make sure keyword-only arguments have a default
...
Fixes #1872 .
This prevents inspect.Parameter.empty from slipping through to the
command.
2016-09-15 15:44:33 +02:00
Florian Bruhin
fce9783570
Fix unit tests
...
Apart from changed parameters, messages now log even when messagemock is
used, so we needed to add a few caplog.at_level calls.
2016-09-15 14:51:22 +02:00
Florian Bruhin
a2254b671c
Adjust tests/messagemock
2016-09-15 14:51:21 +02:00
Florian Bruhin
8823ed2821
Improve cmdutils tests
...
This would have caught 12061b8bb1
.
2016-08-25 22:16:25 +02:00
Florian Bruhin
943dc564b2
Fix choices validation with unannotated args
...
Something like:
@cmdutils.argument('foo', choices=['one', 'two'])
def func(foo):
# ...
didn't actually validate the foo argument, since the inferred type of
the argument is None, and that skipped all conversion (and thus
validation).
Fixes #1871
See #1885
This is a reworked version of 12061b8bb1
which lets special parameters (count/win_id/flags) through correctly.
2016-08-25 22:16:25 +02:00