Florian Bruhin
62e55499eb
Privatize all attributes which aren't needed from the outside.
2014-09-24 22:25:11 +02:00
Florian Bruhin
812a0fdd41
Merge branch 'newcmd'
...
Conflicts:
.flake8
pkg/PKGBUILD.qutebrowser-git
qutebrowser/browser/commands.py
qutebrowser/browser/hints.py
qutebrowser/config/configdata.py
qutebrowser/network/qutescheme.py
qutebrowser/test/config/test_configtypes.py
qutebrowser/utils/utils.py
2014-09-22 19:09:48 +02:00
Florian Bruhin
1bc5160453
Make it possible to use CSS strings in ui->user-stylesheet.
2014-09-19 00:35:17 +02:00
Florian Bruhin
0c4d15ea5a
safe_shlex_split: Fix broken \' in test.
2014-09-18 16:56:50 +02:00
Florian Bruhin
38108c68a2
Add tests for single quote with safe_shlex_split.
2014-09-18 16:14:31 +02:00
Florian Bruhin
5eef6d422d
Better exception formatting and handling.
2014-09-16 08:20:19 +02:00
Florian Bruhin
e3d16f3bbe
Full read-write support for key config.
2014-09-09 22:18:00 +02:00
Florian Bruhin
1220f0c5fd
Move webelem from utils to browser.
2014-09-08 10:30:05 +02:00
Florian Bruhin
57d51ad9bb
Lots of fixes for new command system.
...
Squashed commit:
- Fix getting current URL
- Get rid of *args for hints.
- Make enums work.
- Fix moving commands to utilcmds.
- Fix enums in argparse
- Fix arg splitting for hints.
- Fix default enum args.
- Fix argument splitting for hints if None is given.
- Fix set_cmd_text with flags and fix {url}.
- Fix unittests
- Fix tuple types for arguments.
- Fix scroll-page.
- Fix lint
- Fix open_target.
- Others
2014-09-08 07:36:17 +02:00
Florian Bruhin
b856bf3a47
Improve webelement API
2014-09-04 20:30:59 +02:00
Florian Bruhin
bcaba3f5ca
Rename tests to reflect renamed modules.
2014-09-02 08:27:53 +02:00
Florian Bruhin
83e9638d42
Add fancy URL to tests.
2014-09-02 08:21:53 +02:00
Florian Bruhin
e112038a8b
Handle IPv6 literals correctly.
2014-09-02 08:20:33 +02:00
Florian Bruhin
96c1d53222
urlutils: Strip URL before testing.
2014-09-02 07:11:01 +02:00
Florian Bruhin
71a2ade637
Fix URL detection corner cases.
2014-09-02 06:53:52 +02:00
Florian Bruhin
562388fe52
Rename config.conftypes to config.configtypes.
2014-08-26 21:41:41 +02:00
Florian Bruhin
5adf48ed3d
Rename utils.url to utils.urlutils.
2014-08-26 20:33:41 +02:00
Florian Bruhin
8bd64382bd
Rename utils.qt to utils.qtutils.
2014-08-26 20:25:11 +02:00
Florian Bruhin
d9a8cbe7ad
Rename utils.misc to utils.utils
2014-08-26 20:20:17 +02:00
Florian Bruhin
e04b31eb90
Remove qt_ prefix from qtutils functions.
2014-08-26 19:23:06 +02:00
Florian Bruhin
d625cde28c
Clean up imports
2014-08-26 19:10:14 +02:00
Florian Bruhin
d2b7530c0a
Merge branch 'master' of ssh://lupin/qutebrowser
2014-08-25 07:01:33 +02:00
Florian Bruhin
e576ff608f
utils.webelem: Don't treat select boxes as editable.
2014-08-22 07:54:48 +02:00
Florian Bruhin
c826db7e03
Make editor config configurable
2014-08-20 20:57:10 +02:00
Florian Bruhin
ef1035f2ba
utils.rfc6266: Fix lint
2014-08-14 13:29:07 +02:00
Florian Bruhin
62b00e5ff6
utils.rfc6266: Test for invalid ISO-8859-1 and duplicate params.
2014-08-14 13:29:06 +02:00
Florian Bruhin
532f739e26
tests: Fix rfc6266 testcase.
2014-08-14 13:29:06 +02:00
Florian Bruhin
e159990363
utils.rfc6266: Initial implementation.
2014-08-14 13:29:06 +02:00
Florian Bruhin
48e81b34d0
http: remove change_content_type.
...
We're probably not going to need it.
2014-08-12 21:16:33 +02:00
Florian Bruhin
cdd7457aee
utils.http: Return [None, None] in parse_content_type.
2014-08-12 21:12:13 +02:00
Florian Bruhin
5b915186d7
Add a 'smart' option for ignore-case.
2014-08-12 17:00:18 +02:00
Florian Bruhin
5b3abfa5dd
tests: Disable logging properly.
2014-08-12 16:28:32 +02:00
Florian Bruhin
7be3976890
tests: Add tests for tests.utils.http
2014-08-12 09:13:03 +02:00
Florian Bruhin
cf3fa25ef4
tests.utils.http: Add __init__.py
2014-08-12 09:04:26 +02:00
Florian Bruhin
157f5b211f
tests: Adjust FakeNetworkReply to work with all headers.
2014-08-12 09:03:38 +02:00
Florian Bruhin
c86e252a9b
Change tests to use is_url instead of _is_url_naive.
2014-08-12 07:09:40 +02:00
Florian Bruhin
be2604cacd
Add a new qutebrowser.utils.http module
2014-08-12 07:00:04 +02:00
Florian Bruhin
4ff9804f2c
Fix lint
2014-08-07 14:47:39 +02:00
Florian Bruhin
837b2b386e
utils.debug: Add a broken qflags_key.
2014-08-07 14:41:39 +02:00
Florian Bruhin
5c50640a68
test_debug: Improve tests for qenum_key.
2014-08-07 14:40:34 +02:00
Florian Bruhin
b8ad04bbe7
test_conftypes: Fix lint.
2014-08-07 07:56:59 +02:00
Florian Bruhin
8756d9e644
test_conftypes: Test float point size correctly.
2014-08-07 07:56:47 +02:00
Florian Bruhin
ef603090c8
test_conftypes: Activate test for QtFont.
2014-08-07 07:39:36 +02:00
Florian Bruhin
956f6ef5e6
test_conftypes: Use qenum_key for Font.__repr__
2014-08-07 07:35:25 +02:00
Florian Bruhin
2546c871c8
utils.debug: Improve qenum_key.
2014-08-07 07:35:05 +02:00
Florian Bruhin
19b80c1e90
test_conftypes: Adjust docstring.
2014-08-07 07:34:46 +02:00
Florian Bruhin
fef5a9944f
conftypes: Use namedtuple for font descriptions.
2014-08-07 07:31:41 +02:00
Florian Bruhin
c7ee655750
Use pylint to check modelines and fix them.
2014-08-06 23:51:44 +02:00
Florian Bruhin
7818366f0a
Fix lint
2014-08-05 23:23:15 +02:00
Florian Bruhin
f5064c6295
test: Use unittest's subTest.
...
https://docs.python.org/3.4/library/unittest.html#distinguishing-test-iterations-using-subtests
2014-08-05 22:15:12 +02:00
Florian Bruhin
4d051bea73
test_conftypes: Fix lint
2014-08-05 21:16:30 +02:00
Florian Bruhin
263ee37685
test_conftype: More tests.
2014-08-05 21:08:12 +02:00
Florian Bruhin
ac6defaa7f
test_conftypes: Cleanups.
2014-08-05 21:08:01 +02:00
Florian Bruhin
2a34366d2c
test: Remove unneeded custom __eq__ methods.
2014-08-05 21:07:37 +02:00
Florian Bruhin
3b93f6121b
Add more unittypes tests.
2014-08-05 18:02:52 +02:00
Florian Bruhin
8d07ec2235
test_conftypes: Add (broken) Font tests.
2014-08-05 17:08:16 +02:00
Florian Bruhin
ec1b31a61c
test_conftypes: Add more tests.
2014-08-05 15:01:29 +02:00
Florian Bruhin
963fb40961
conftypes: Various bugfixes/cleanups/tests.
2014-08-05 14:16:15 +02:00
Florian Bruhin
a117cf0405
test_conftypes: Add more tests.
2014-08-05 13:06:03 +02:00
Florian Bruhin
8fdeab32c5
Add first tests for conftypes.
2014-08-05 07:27:29 +02:00
Florian Bruhin
ee1b136807
Clean up pylint/noqa comments.
2014-08-04 03:47:09 +02:00
Florian Bruhin
8ce779261f
Parse Content-Disposition headers more relaxed.
...
Before, we got an unhandled ValueError if there were multiple spaces in a
filename.
Instead of ignoring such a header altogether, we now add relaxed=True which
still tries to get the filename in this situation (and with a semicolon at the
line end).
Because the parser is also more relaxed in that second case, we mark a test as
expected failure.
2014-07-29 22:36:00 +02:00
Florian Bruhin
860ef75abc
Fix lint
2014-07-28 21:09:49 +02:00
Florian Bruhin
8d80ce2628
Switch to python 3.4 enums.
...
Our home-brewn enum wasn't really liked by pylint (many no-member errors), so
instead of adding some workaround, we just use the python 3.4 enum instead.
This however also means we need to depend on Python 3.4 and not 3.3. Maybe we
should use enum34 on Python < 3.3.
2014-07-28 20:41:42 +02:00
Florian Bruhin
e0bd89b762
Add an {url} variable for commands.
...
Note this also means we don't support :spawn running in a shell anymore, as
{url} is evaluated earlier. However this should be fine, as there's no really
important use case for that anyways, and shell escaping on Windows is rather
unmaintainable.
2014-07-28 01:40:36 +02:00
Florian Bruhin
2d3575f6d1
Remove tab close buttons
2014-07-16 13:04:08 +02:00
Florian Bruhin
81ff622291
Improve highlight_color tests.
2014-07-16 13:04:08 +02:00
Florian Bruhin
b47d53953b
Add a highlight_color util function.
2014-07-16 13:04:08 +02:00
Florian Bruhin
20e8c464e6
Check for QtValueErrors in interpolate_color tests.
2014-07-16 13:04:08 +02:00
Florian Bruhin
ca74fa28ac
Use a nicer Color() class for tests.
2014-07-16 13:04:08 +02:00
Florian Bruhin
d5c8e73b14
Use same focus code for insertmode/editor
2014-07-16 06:58:01 +02:00
Florian Bruhin
117755863d
Fix lint
2014-07-04 07:41:03 +02:00
Florian Bruhin
37ed9deecf
Add tests for key_to_string and keyevent_to_string.
2014-07-04 07:35:33 +02:00
Florian Bruhin
539325db90
Move fake_keyevent to test.helpers
2014-07-04 07:35:04 +02:00
Florian Bruhin
ea84ce7acf
Force keybindings to lower case
2014-07-03 07:46:14 +02:00
Florian Bruhin
d45e883f6d
Move NormalizeTests to test.utils.test_misc
2014-07-03 07:41:23 +02:00
Florian Bruhin
0d037c74d4
Fix lint
2014-07-01 07:57:19 +02:00
Florian Bruhin
29064850c7
Begin using unittest.mock.patch
2014-06-30 20:35:43 +02:00
Florian Bruhin
66f0ef8009
Adjust test_basekeyparser for the named Timer.
2014-06-29 22:15:01 +02:00
Florian Bruhin
dd125cd0be
Mock out logging instead of disabling in test_basekeyparser.
2014-06-29 22:14:46 +02:00
Florian Bruhin
8d237229f5
Add __init__.py in test/keyinput
2014-06-29 21:17:38 +02:00
Florian Bruhin
31e0cde35b
Add tests for is_editable.
2014-06-23 20:31:47 +02:00
Florian Bruhin
2065f17cb5
Clean up tests
2014-06-23 19:44:21 +02:00
Florian Bruhin
914f7ace81
Fix Content-Disposition tests on Linux
2014-06-23 14:54:12 +02:00
Florian Bruhin
fdb4b24148
Remove excess newlines
2014-06-23 12:28:55 +02:00
Florian Bruhin
19688f5055
Add tests for parse_content_disposition
2014-06-23 12:16:01 +02:00
Florian Bruhin
8a8ca0c34f
Split utils.misc into utils.{qt,misc}
2014-06-23 07:45:04 +02:00
Florian Bruhin
5996651a2f
Merge utils.signals into utils.debug
2014-06-23 07:11:15 +02:00
Florian Bruhin
0dc2ecef46
Check QUrl objects for validity
2014-06-20 23:57:52 +02:00
Florian Bruhin
9a33efdb3f
Fix is_special_url (use QUrl).
2014-06-20 20:27:24 +02:00
Florian Bruhin
0fd64419da
Remove urlutils.{urlstring,qurl}.
...
The idea of treating an URL-string and a QUrl as essentially the same data type
got us into all kinds of problems. Now we use QUrl everywhere except at the
borders to the user interface.
2014-06-20 16:33:01 +02:00
Florian Bruhin
0fa309e2a4
Add a test for init_log if sys.stderr is None.
2014-06-20 08:50:04 +02:00
Florian Bruhin
e1ae4cb54c
Add a base class for logging tests.
2014-06-20 08:49:48 +02:00
Florian Bruhin
d443e585d3
Add missing test_debug.py
2014-06-20 06:23:41 +02:00
Florian Bruhin
d65587128f
Add vim modelines to all files.
2014-06-19 09:04:37 +02:00
Florian Bruhin
e6866f7d85
Don't go to insert mode on disabled/readonly fields
2014-06-17 15:32:18 +02:00
Florian Bruhin
6d4f961a50
Merge branch 'downloads'
...
Conflicts:
BUGS
2014-06-13 23:11:44 +02:00
Florian Bruhin
efd83f40ca
Print human readable sizes in downloads
2014-06-13 07:13:47 +02:00
Florian Bruhin
8c673ee66c
Add basic download info to view
2014-06-12 23:29:34 +02:00
Florian Bruhin
2ffc9bb00a
Add colors to DownloadView
2014-06-12 21:43:30 +02:00
Florian Bruhin
c90e01e16a
Fix qt_args test.
...
The order of the arguments is non-deterministic.
2014-06-12 15:17:38 +02:00
Florian Bruhin
1b8a44ac26
Simplify get_qt_args
2014-06-12 15:13:26 +02:00
Florian Bruhin
12830381cb
Add tests for get_qt_args
2014-06-10 12:00:45 +02:00
Florian Bruhin
6967002aed
Fix logfilter tests by using debug as default level
2014-06-06 17:25:08 +02:00
Florian Bruhin
2f1cd43f9c
Change lists to tuples for immutable values
2014-06-06 17:21:35 +02:00
Florian Bruhin
03d754dd86
Fix logfilter bugs
2014-06-06 16:51:24 +02:00
Florian Bruhin
9c9492a706
logfilter: Only filter debug messages
2014-06-06 15:48:42 +02:00
Florian Bruhin
500ad24cc3
Add keybindings for Ctrl-?/H/J/[ for Delete/Backspace/Return/Escape
2014-06-05 13:20:10 +02:00
Florian Bruhin
311b9f2034
Get rid of FakeDict
2014-06-04 07:16:02 +02:00
Florian Bruhin
83d8bc47c0
Make it possible to pass a start= argument to enum()
2014-06-04 07:02:04 +02:00
Florian Bruhin
fa1e03f56b
_foo.py file rename [1/2]
2014-06-03 14:57:57 +02:00
Florian Bruhin
fb7f1b381e
Fix lint
2014-06-02 18:01:56 +02:00
Florian Bruhin
161b2ef7af
Fix whitespace/CRLF
2014-05-27 16:24:26 +02:00
Florian Bruhin
0cac061feb
Clear logger handlers for log tests
2014-05-27 16:23:27 +02:00
Florian Bruhin
404ba37a0a
Add tests for readline
2014-05-27 14:58:07 +02:00
Florian Bruhin
0130a15efe
Add more RAMHandlerTests.
2014-05-27 13:49:55 +02:00
Florian Bruhin
b76004e7a1
Add tests for LogFilter
2014-05-27 13:36:11 +02:00
Florian Bruhin
b0a131eb1c
Add docstrings to tests
2014-05-27 13:06:13 +02:00
Florian Bruhin
f8adeb3234
Add some docs to test_editor.py
2014-05-27 11:52:41 +02:00
Florian Bruhin
ece794e4b4
Add TextModifyTests and ErrorMessageTests
2014-05-27 11:47:43 +02:00
Florian Bruhin
6557fa68a6
More editor test cleanup
2014-05-27 11:30:57 +02:00
Florian Bruhin
89a507a0bb
Add ArgTests
2014-05-27 11:17:27 +02:00
Florian Bruhin
15f8a3e6dd
editor test cleanup
2014-05-27 11:17:14 +02:00
Florian Bruhin
8b0144f6a3
Add editor tests
2014-05-27 07:43:29 +02:00
Florian Bruhin
19da80e58e
Improve logging in signal filter
2014-05-16 21:49:35 +02:00
Florian Bruhin
70214bfedf
Add elide()
2014-05-16 07:46:56 +02:00
Florian Bruhin
a70aa212e0
Fix lint
2014-05-15 22:02:43 +02:00
Florian Bruhin
d3eaeaac91
First steps at getting rid of signal cache
2014-05-15 17:57:08 +02:00
Florian Bruhin
8b13658eaf
NeighborList: Don't snap in values if they match exactly
2014-05-15 15:38:53 +02:00
Florian Bruhin
603fbdf239
Range-check all values passed to C code.
2014-05-15 00:02:20 +02:00
Florian Bruhin
7c1ba7ab48
Fix lint
2014-05-12 17:46:15 +02:00
Florian Bruhin
7b7c82fe45
Also check if invalid keys are processed
2014-05-12 17:43:12 +02:00
Florian Bruhin
41a1671630
Add tests for basekeyparser
2014-05-12 17:39:37 +02:00
Florian Bruhin
db7077d94f
Clean up javascript_escape
2014-05-12 14:33:12 +02:00
Florian Bruhin
fa4b914326
Add tests for get_child_frames
2014-05-12 13:26:11 +02:00
Florian Bruhin
2ac787598d
Add tests for is_visible with iframes
2014-05-12 12:16:41 +02:00
Florian Bruhin
80d4068ad5
Clean up test_webelem
2014-05-12 11:41:35 +02:00
Florian Bruhin
366af0dd4c
Add tests for CSS visibility attributes
2014-05-12 11:07:08 +02:00
Florian Bruhin
535c7c316c
Fix tests for webelem.is_visible
2014-05-12 10:59:59 +02:00
Florian Bruhin
fd9f801cab
Define some magic methods for usertypes
2014-05-09 22:11:33 +02:00
Florian Bruhin
7868e57520
Add snap_in/fuzzyval to NeighborList
2014-05-09 14:20:10 +02:00
Florian Bruhin
01d1b18c8f
Fix indent
2014-05-09 09:20:11 +02:00
Florian Bruhin
489a5cd082
Add tests for get_standard_dir under Windows
2014-05-09 09:16:24 +02:00
Florian Bruhin
a6f8602276
Don't use self with self.cur_dir.
2014-05-09 09:15:00 +02:00
Florian Bruhin
c82e050deb
Fix checks
2014-05-09 08:46:14 +02:00
Florian Bruhin
6609fc8503
Add tests for utils.misc.get_standard_dir
2014-05-09 08:43:31 +02:00
Florian Bruhin
ef05175713
Add test helper to set temporary value
2014-05-09 07:44:37 +02:00
Florian Bruhin
6a6807fde9
Reorganize test files
2014-05-09 06:57:35 +02:00
Florian Bruhin
7fb0a7745b
Don't treat single words as URL
2014-05-06 14:25:11 +02:00
Florian Bruhin
c8fd0937b0
Revert "Use global object dict for global objects"
...
This reverts commit bf2c7831c8
.
This was a bad idea as we need to access some of the main attributes
from commands via instance=...
2014-05-05 20:12:20 +02:00