Commit Graph

7512 Commits

Author SHA1 Message Date
Florian Bruhin
4314d6420b pytest: Don't show skipped test summaries by default 2016-03-02 07:27:25 +01:00
Florian Bruhin
9efae021fa Set xfail_strict=true for pytest 2016-03-02 07:14:50 +01:00
Florian Bruhin
d1ec64cab1 Remove skip marker as it's builtin in pytest now 2016-03-02 07:14:06 +01:00
Florian Bruhin
1169d5ac52 Reduce pytest output on CI.
We don't need -v anymore as pytest 2.9 will display full diffs either way.
2016-03-02 07:12:47 +01:00
Florian Bruhin
531f4a85ff tox: Update pytest to 2.9.0.
New Features

- New pytest.mark.skip mark, which unconditionally skips marked tests.
- --doctest-glob may now be passed multiple times in the command-line.
- New -rp and -rP reporting options give the summary and full output of passing
  tests, respectively.
- pytest.mark.xfail now has a strict option which makes XPASS tests to fail the
  test suite, defaulting to False. There’s also a xfail_strict ini option that
  can be used to configure it project-wise.
- Parser.addini now supports options of type bool.
- New ALLOW_BYTES doctest option strips b prefixes from byte strings in doctest
  output (similar to ALLOW_UNICODE).
- give a hint on KeyboardInterrupt to use the –fulltrace option to show the
  errors
- catch IndexError exceptions when getting exception source location. This
  fixes pytest internal error for dynamically generated code (fixtures and
  tests) where source lines are fake by intention

Changes

- Important: py.code has been merged into the pytest repository as
  pytest._code. This decision was made because py.code had very few uses
  outside pytest and the fact that it was in a different repository made it
  difficult to fix bugs on its code in a timely manner. The team hopes with
  this to be able to better refactor out and improve that code. This change
  shouldn’t affect users, but it is useful to let users aware if they encounter
  any strange behavior.

  Keep in mind that the code for pytest._code is private and experimental, so
  you definitely should not import it explicitly!

  Please note that the original py.code is still available in pylib.

- pytest_enter_pdb now optionally receives the pytest config object.

- Removed code and documentation for Python 2.5 or lower versions, including
  removal of the obsolete _pytest.assertion.oldinterpret module.

- Comparisons now always show up in full when CI or BUILD_NUMBER is found in
  the environment, even when -vv isn’t used.

- --lf and --ff now support long names: --last-failed and --failed-first
  respectively.

- Added expected exceptions to pytest.raises fail message

- Collection only displays progress (“collecting X items”) when in a terminal.
  This avoids cluttering the output when using --color=yes to obtain colors in
  CI integrations systems

Bug Fixes

- The -s and -c options should now work under xdist; Config.fromdictargs now
  represents its input much more faithfully.
- support Python 3.5’s @ operator in assertion rewriting.
- Fix formatting utf-8 explanation messages.
- Fix traceback style docs to describe all of the available options
  (auto/long/short/line/native/no), with auto being the default since v2.6.
- junit record_xml_property doesn’t allow multiple records with same name.
2016-03-02 07:08:04 +01:00
Tomas Orsava
ffe289b410 Updated installation instructions for Fedora. 2016-02-29 17:55:09 +01:00
Florian Bruhin
2542f114ad tox: Update pyroma to 2.0.0
- Big rewrite of how data is extracted from Distutils/Setuptools.
2016-02-29 06:47:33 +01:00
Tarcisio Fedrizzi
9286fadeee Adds wait to paste multiline text test 2016-02-29 00:39:37 +01:00
Tarcisio Fedrizzi
8f593d948c Fixing flake8 error 2016-02-28 23:56:23 +01:00
Tarcisio Fedrizzi
25bc2dc1db Changes formatters to print multiline text on one line 2016-02-28 23:45:02 +01:00
Tarcisio Fedrizzi
a9fdf09a04 Adds test of the heuristic 2016-02-28 23:44:26 +01:00
Tarcisio Fedrizzi
89ac5cba62 Adds test to reach 100% coverage on urlutils 2016-02-28 23:43:38 +01:00
Tarcisio Fedrizzi
d8ad0a14af Fixes wrong documentation 2016-02-28 23:42:14 +01:00
Tarcisio Fedrizzi
0ab44c4f4a Reformats code as requested 2016-02-28 23:41:20 +01:00
Florian Bruhin
c6c4762be1 Merge branch 'Kingdread-data-link-fix' 2016-02-28 15:27:12 +01:00
Florian Bruhin
5395e0f6e2 tests: Use a fresh instance as a workaround
Waiting seems like a perfect recipe for another flaky test, so let's better be
safe.
2016-02-28 15:26:18 +01:00
Florian Bruhin
108d0c8763 tox: Update flake8-deprecated to 1.0.
- Warn if using xmlconfig.file, self.loadZCML is the preferred option.
- Avoid false reports by suffixing an opening parenthesis on all methods.
- Add decorators from zope.interface and zope.component.

Due to the bugfix we can also remove the D001 suppression.
2016-02-28 14:47:24 +01:00
Tarcisio Fedrizzi
79ad65ee64 Fixes flake8 errors 2016-02-27 12:36:13 +01:00
Tarcisio Fedrizzi
67ebdc6eb6 Fixes the position of the logging line 2016-02-27 11:54:23 +01:00
Tarcisio Fedrizzi
702b235981 Fixes formatting to make pylint happy. 2016-02-27 11:54:23 +01:00
Tarcisio Fedrizzi
006d8760c4 Adds path checking to the multiline url heuristic 2016-02-27 11:54:23 +01:00
Tarcisio Fedrizzi
4500bc24d4 fuzzy_url uses path check function 2016-02-27 11:54:23 +01:00
Tarcisio Fedrizzi
594b0d2910 Refactors path validity check to its own function 2016-02-27 11:54:23 +01:00
Tarcisio Fedrizzi
4aa7649c0a Implemented heurisitc on multiline paste 2016-02-27 11:54:23 +01:00
Florian Bruhin
c156f53eba Merge branch 'data-link-fix' of https://github.com/Kingdread/qutebrowser into Kingdread-data-link-fix 2016-02-27 03:01:19 +01:00
Florian Bruhin
48f87d1656 Revert "Use pytest-platform-markers"
This reverts commit 2e12fb3c65.

It seems like it's currently broken...
2016-02-27 02:45:34 +01:00
Florian Bruhin
a4687c6745 Fix lint 2016-02-27 02:41:01 +01:00
Florian Bruhin
0f5b4d58e2 pytest.ini: Remove registration of flaky marker
It's already registered by the plugin.
2016-02-27 02:40:30 +01:00
Florian Bruhin
fab86cce5e tox: Update pytest-xvfb to 0.2.0
- The ``no_xvfb``-marker is now registered automatically so pytest doesn't fail
  when run with ``--strict``.
- The ``xvfb`` fixture is now session-scoped.
2016-02-27 02:25:08 +01:00
Florian Bruhin
83e86706ff tests: Make check for ddg being loaded less strict
Before this change, adding a new logging message involving logging e.g. the
default duckduckgo setting value failed.

Now we basically use a black- instead of a whitelist and only fail if we get a
load status message for duckduckgo.
2016-02-27 02:16:42 +01:00
Florian Bruhin
2e12fb3c65 Use pytest-platform-markers 2016-02-27 00:26:24 +01:00
Florian Bruhin
10f9ac6c27 tox: Update hypothesis to 3.0.5
- Fix a bug where Hypothesis would now error on py.test development versions.
2016-02-25 21:12:47 +01:00
Florian Bruhin
7c90f8900c tox: Update pytest-mock to 0.11.0.
- PropertyMock is now accessible from mocker.
- Fix regression using one of the assert_* methods in patched functions which
  receive a parameter named method.
2016-02-24 20:15:10 +01:00
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
Daniel Schadt
20daf1f86e fix lint 2016-02-23 14:33:10 +01:00
Florian Bruhin
0df4da5b91 Also display XDG_* in crash reports 2016-02-23 08:47:53 +01:00
Daniel Schadt
e5dc10a29e downloads: handle relative XDG_DOWNLOAD_DIR
Issues #1269, #866

qutebrowser would crash when XDG_DOWNLOAD_DIR was set to some
non-absolute value (which should not happen, but it can) and
"storage -> download-dir" was empty, since when the user didn't give an
absolute filename, even the joined path of download_dir() (i.e.
XDG_DOWNLOAD_DIR in this case) and the filename was not absolute either.

Since the path was not absolute, create_full_filename returned None,
which meant that os.path.basename(self._filename) raised an exception.

Now we display an error message and fall back to $HOME.
2016-02-22 23:43:09 +01:00
Daniel Schadt
a382b366bc tests: increase wait time
Otherwise the test might still fail on some systems
2016-02-22 21:46:54 +01:00
avk
c9bb6d0111 tests for browser.network.pastebin - code refactor 2016-02-22 20:46:22 +01:00
Daniel Schadt
a84c8ac247 tests: add workaround for QPainter bug
As suggested in the github discussion.
2016-02-22 17:39:34 +01:00
avk
90c8078225 More tests for browser.network.pastebin 2016-02-22 16:09:57 +01:00
avk
6826a97910 Tests for browser.network.pastebin 2016-02-22 15:10:39 +01:00
avk
7cc43d3954 Merge branch 'master' of https://github.com/The-Compiler/qutebrowser 2016-02-22 12:28:41 +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
avk
033ac0bbad Merge branch 'master' of https://github.com/The-Compiler/qutebrowser 2016-02-19 22:13:39 +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