Daniel Schadt
716ce701f5
utils: move elide_filename to own function
...
Also increase the elide limit in TempDownloadManager to 50, since that's
probably still enough for all systems.
2016-08-03 17:59:32 +02:00
Florian Bruhin
9851a13981
Add utils.random_port()
2016-08-03 13:08:55 +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
Florian Bruhin
a23aa1cc47
Fix broken supports_selection() test
2016-05-08 22:39:39 +02:00
Florian Bruhin
b9b6f357da
Add utils.supports_selection()
2016-05-08 22:06:59 +02:00
Florian Bruhin
2a343cb3a1
Various code style improvements
2016-04-27 20:25:27 +02:00
Florian Bruhin
0b491f6caf
Use json.dumps for logged fake clipboard.
...
For some reason, when comparing the repr in the two processes, we get different
results on OS X and Windows:
- expected: "fünf"
- "f\xfcnf" coming back from the subprocess on OS X
- "fnf" on Windows
Instead we're comparing the json dump now, which should be more predictable.
2016-02-03 20:54:35 +01:00
Florian Bruhin
79f83a033d
Add a fake clipboard for tests
...
There are a lot of problems and flakiness with using a real clipboard.
Instead we now have a :debug-set-fake-clipboard command to set a text, and use
logging when getting the contents.
Fixes #1285 .
2016-02-03 20:27:11 +01:00
Florian Bruhin
4d9ea06768
tests: Make test IDs predictable.
...
This means we could use xdist in the future.
2016-01-25 22:15:31 +01:00
Florian Bruhin
526441bcae
Fix new flake8 lint.
...
For some reason these issues weren't shown with pytest-pep8/flakes.
2016-01-22 17:33:58 +01:00
Florian Bruhin
a5f2ac5f03
Adjust copyright years.
2016-01-04 07:12:39 +01:00
Florian Bruhin
e6284ed5d4
tests: Improve some ugly test IDs.
2015-12-16 22:21:29 +01:00
Florian Bruhin
803398c49b
Use some more fixtures for older tests.
2015-12-01 22:40:58 +01:00
Florian Bruhin
16e1a65448
Merge branch 'download-page' of https://github.com/Kingdread/qutebrowser into Kingdread-download-page
2015-11-23 13:16:16 +01:00
Florian Bruhin
1ec03462c8
Add a utils.parse_keystring.
2015-11-20 07:06:16 +01:00
Daniel Schadt
3438a45b19
Merge branch 'master' into download-page
2015-11-18 19:27:26 +01:00
Florian Bruhin
dd2ec30b97
Revert "Use parametrization for TestKeyToString:test_all."
...
This reverts commit aa1ea9b063
.
I changed my mind on this, generating >400 tests for this is stupid.
2015-11-18 18:15:21 +01:00
Florian Bruhin
416cfaf002
tests: Switch from pytest-capturelog to catchlog.
2015-11-11 19:57:03 +01:00
Daniel
a1bc020fec
mhtml: Sanitize default filename suggestion
2015-11-09 17:01:08 +01:00
Florian Bruhin
883febe243
Return a QColor for qtutils.interpolate_color.
...
This broke the tests for older PyQt versions because the test had a
test_utils.Color(test_utils.Color(...)) object (double-wrapped), and the
comparisons failed there for some reason.
2015-10-26 06:45:36 +01:00
Florian Bruhin
f614e5b98a
Add none value for colors -> tabs.indicator.system.
2015-10-24 16:01:32 +02:00
Florian Bruhin
88167ce4ce
Shorten test IDs.
2015-09-16 20:25:02 +02:00
Florian Bruhin
2c5269acd6
Reorganize tests directory.
2015-08-18 20:19:02 +02:00