Commit Graph

92 Commits

Author SHA1 Message Date
Florian Bruhin
d805e2d71e Don't use lxml for check_coverage.py.
See #792.
2015-07-24 14:42:18 +02:00
Florian Bruhin
7f2abd1a46 tests: Enforce 100% coverage for perfect modules.
Fixes #792.
2015-07-24 14:04:40 +02:00
Florian Bruhin
5e58d814d7 tox: Add a unittests-watch environment. 2015-07-23 11:31:51 +02:00
Florian Bruhin
e81ac925d7 tox: Adjust pep257 comment. 2015-07-21 10:26:57 +02:00
Florian Bruhin
0b8c054dc1 tox: Update pep257 to 0.6.0
Upstream changelog:

New Features

* Added support for more flexible error selections using --ignore, --select,
  --convention, --add-ignore and --add-select (#96, #123).

Bug Fixes

* Property setter and deleter methods are now treated as private and do not
  require docstrings separate from the main property method (#69, #107).

* Fixed an issue where pep257 did not accept docstrings that are both
  unicode and raw in Python 2.x (#116, #119).

* Fixed an issue where Python 3.x files with Unicode encodings were
  not read correctly (#118).
2015-07-21 10:21:48 +02:00
Florian Bruhin
474255cbe7 Move pytest options to pytest.ini. 2015-07-19 21:56:09 +02:00
Florian Bruhin
43500b2e24 tox: Fix posargs handling for tests. 2015-07-19 21:54:51 +02:00
Florian Bruhin
4905cfc7a5 tox: Update logilab-common to 1.0.2.
Upstream changelog:

* declare setuptools requirement in __pkginfo__/setup.py
* randomize order of test modules in pytest -t
2015-07-10 12:00:26 +02:00
Florian Bruhin
dbef785a94 tox: Update pytest-mock to 0.7.0. 2015-07-08 07:14:22 +02:00
Florian Bruhin
de91142880 tox: Add path to tests. 2015-07-06 18:50:34 +02:00
Florian Bruhin
d232437105 Update to beautifulsoup 4.4.0.
Upstream changelog:

Especially important changes:

* Added a warning when you instantiate a BeautifulSoup object without
  explicitly naming a parser. [bug=1398866]

* __repr__ now returns an ASCII bytestring in Python 2, and a Unicode
  string in Python 3, instead of a UTF8-encoded bytestring in both
  versions. In Python 3, __str__ now returns a Unicode string instead
  of a bytestring. [bug=1420131]

* The `text` argument to the find_* methods is now called `string`,
  which is more accurate. `text` still works, but `string` is the
  argument described in the documentation. `text` may eventually
  change its meaning, but not for a very long time. [bug=1366856]

* Changed the way soup objects work under copy.copy(). Copying a
  NavigableString or a Tag will give you a new NavigableString that's
  equal to the old one but not connected to the parse tree. Patch by
  Martijn Peters. [bug=1307490]

* Started using a standard MIT license. [bug=1294662]

* Added a Chinese translation of the documentation by Delong .w.

New features:

* Introduced the select_one() method, which uses a CSS selector but
  only returns the first match, instead of a list of
  matches. [bug=1349367]

* You can now create a Tag object without specifying a
  TreeBuilder. Patch by Martijn Pieters. [bug=1307471]

* You can now create a NavigableString or a subclass just by invoking
  the constructor. [bug=1294315]

* Added an `exclude_encodings` argument to UnicodeDammit and to the
  Beautiful Soup constructor, which lets you prohibit the detection of
  an encoding that you know is wrong. [bug=1469408]

* The select() method now supports selector grouping. Patch by
  Francisco Canas [bug=1191917]

Bug fixes:

* Fixed yet another problem that caused the html5lib tree builder to
  create a disconnected parse tree. [bug=1237763]

* Force object_was_parsed() to keep the tree intact even when an element
  from later in the document is moved into place. [bug=1430633]

* Fixed yet another bug that caused a disconnected tree when html5lib
  copied an element from one part of the tree to another. [bug=1270611]

* Fixed a bug where Element.extract() could create an infinite loop in
  the remaining tree.

* The select() method can now find tags whose names contain
  dashes. Patch by Francisco Canas. [bug=1276211]

* The select() method can now find tags with attributes whose names
  contain dashes. Patch by Marek Kapolka. [bug=1304007]

* Improved the lxml tree builder's handling of processing
  instructions. [bug=1294645]

* Restored the helpful syntax error that happens when you try to
  import the Python 2 edition of Beautiful Soup under Python
  3. [bug=1213387]

* In Python 3.4 and above, set the new convert_charrefs argument to
  the html.parser constructor to avoid a warning and future
  failures. Patch by Stefano Revera. [bug=1375721]

* The warning when you pass in a filename or URL as markup will now be
  displayed correctly even if the filename or URL is a Unicode
  string. [bug=1268888]

* If the initial <html> tag contains a CDATA list attribute such as
  'class', the html5lib tree builder will now turn its value into a
  list, as it would with any other tag. [bug=1296481]

* Fixed an import error in Python 3.5 caused by the removal of the
  HTMLParseError class. [bug=1420063]

* Improved docstring for encode_contents() and
  decode_contents(). [bug=1441543]

* Fixed a crash in Unicode, Dammit's encoding detector when the name
  of the encoding itself contained invalid bytes. [bug=1360913]

* Improved the exception raised when you call .unwrap() or
  .replace_with() on an element that's not attached to a tree.

* Raise a NotImplementedError whenever an unsupported CSS pseudoclass
  is used in select(). Previously some cases did not result in a
  NotImplementedError.

* It's now possible to pickle a BeautifulSoup object no matter which
  tree builder was used to create it. However, the only tree builder
  that survives the pickling process is the HTMLParserTreeBuilder
  ('html.parser'). If you unpickle a BeautifulSoup object created with
  some other tree builder, soup.builder will be None. [bug=1231545]
2015-07-06 10:49:59 +02:00
Florian Bruhin
2643975c3c tox: Update logilab-common to 1.0.1. 2015-07-02 21:05:48 +02:00
Florian Bruhin
ec1476da2e tox: Update pylint and logilab-common.
pylint changelog:

- Support for logilab-common 1.0.0

logilab-common changelog:

- remove unused/deprecated modules: cli, contexts, corbautils, dbf, pyro_ext,
  xmlrpcutils. __pkginfo__ is no longer installed.
- major layout change
- use setuptools exclusively
- 'logilab' is now a proper namespace package
- modutils: basic support for namespace packages
- registry: ambiguous selects now raise a specific exception
- testlib: better support for non-pytest launchers
- testlib: Tags() now work with py3k
2015-06-30 20:50:12 +02:00
Florian Bruhin
e6655cf66d tox: Add requirements.io filter for logilab-common.
pylint is broken with logilab-common=1.0.0 currently:

https://bitbucket.org/logilab/pylint/issue/575/support-for-logilabcommon-100
2015-06-30 17:58:53 +02:00
Florian Bruhin
616c842f2f tox: Update pytest-qt to 1.5.0.
Upstream changelog:

* Fixed log line number in messages, and provide better contextual information
  in Qt5 (#55, thanks @The-Compiler);
* Fixed issue where exceptions inside a `waitSignals` or `waitSignal`
  with-statement block would be swallowed and a `SignalTimeoutError` would be
  raised instead. (#59, thanks @The-Compiler for bringing up the issue and
  providing a test case);
* Fixed issue where the first usage of `qapp` fixture would return `None`.
  Thanks to @gqmelo for noticing and providing a PR;
* New `qtlog` now sports a context manager method, `disabled` (#58). Thanks
  @The-Compiler for the idea and testing;
2015-06-29 23:16:42 +02:00
Florian Bruhin
b673c39b62 tox: Fix script path for docs env. 2015-06-28 23:04:18 +02:00
Florian Bruhin
9b264c7514 tests: Share common markers. 2015-06-28 22:58:48 +02:00
Florian Bruhin
be3f61af62 Move developer scripts to dev/ subfolder.
Closes #783.
2015-06-28 22:31:30 +02:00
Florian Bruhin
93f5e30a00 tox: Whoops, update all py-lines. 2015-06-26 22:41:30 +02:00
Florian Bruhin
086010d81e tox: Update py (pylib) to 1.4.30.
Upstream changelog:

fix issue68 an assert with a multiline list comprehension was not reported
correctly. Thanks Henrik Heibuerger.
2015-06-26 22:38:58 +02:00
Florian Bruhin
3dbf3f9e0a Use tox/virtualenv to build Windows packages.
This makes sure we have all needed dependencies installed in the version which
is in requirements.txt.
Fixes #776.
2015-06-23 23:31:28 +02:00
Florian Bruhin
d02b63a847 tox: Use --ignore=tests for pep8/pyflakes/mccabe. 2015-06-23 18:17:05 +02:00
Florian Bruhin
f2d7391974 tox: Update pytest to 2.7.2 and pylib to 1.4.29.
pytest upstream changelog
=========================

- fix issue767: pytest.raises value attribute does not contain the exception
  instance on Python 2.6. Thanks Eric Siegerman for providing the test
  case and Bruno Oliveira for PR.

- Automatically create directory for junitxml and results log.
  Thanks Aron Curzon.

- fix issue713: JUnit XML reports for doctest failures.
  Thanks Punyashloka Biswal.

- fix issue735: assertion failures on debug versions of Python 3.4+
  Thanks Benjamin Peterson.

- fix issue114: skipif marker reports to internal skipping plugin;
  Thanks Floris Bruynooghe for reporting and Bruno Oliveira for the PR.

- fix issue748: unittest.SkipTest reports to internal pytest unittest plugin.
  Thanks Thomas De Schampheleire for reporting and Bruno Oliveira for the PR.

- fix issue718: failed to create representation of sets containing unsortable
  elements in python 2. Thanks Edison Gustavo Muenz

- fix issue756, fix issue752 (and similar issues): depend on py-1.4.29
  which has a refined algorithm for traceback generation.

py upstream changelog
=====================

- fix issue55: revert a change to the statement finding algorithm
  which is used by pytest for generating tracebacks.
  Thanks Daniel Hahler for initial analysis.

- fix pytest issue254 for when traceback rendering can't
  find valid source code.  Thanks Ionel Cristian Maries.
2015-06-23 17:19:48 +02:00
Florian Bruhin
fd82587213 Skip documentation when freezing for smoke-frozen. 2015-06-19 09:40:26 +02:00
Florian Bruhin
42b5ee831e Add a unittests-frozen testenv.
See #770.
2015-06-19 09:39:55 +02:00
Florian Bruhin
3ba63128da Add a smoke-frozen testenv.
See #770.
2015-06-19 07:35:01 +02:00
Florian Bruhin
703b0043db tox: Update pyflakes to 0.9.2.
Upstream changelog:

- Fix a traceback when a global is defined in one scope, and used in another.
2015-06-17 17:48:25 +02:00
Florian Bruhin
a024c14dd6 tox: Add smoke test to the default envlist. 2015-06-16 07:37:08 +02:00
Florian Bruhin
b43d8b13d8 tox: Update mccabe to 0.3.1.
Upstream changelog:

- Include test_mccabe.py in releases.
- Always coerce the max_complexity value from Flake8's entry-point to an integer.
2015-06-15 06:21:14 +02:00
Florian Bruhin
8dc9f0562a tox: Update pyroma to 1.8.2.
Upstream changelog:

Do not complain that the version number should be a string, when it is a
basestring. [maurits]
2015-06-14 13:45:09 +02:00
Florian Bruhin
219c2f8ae8 Ignore "Unable to set geometry" warnings in tests.
This reverts commits 9b066ec50a and
83f7cf84a9.

This was still broken even after setting the geometry:

https://ci.appveyor.com/project/The-Compiler/qutebrowser
2015-06-12 17:04:12 +02:00
Florian Bruhin
5a8b7910e0 tox: Use python -m to start pylint.
This makes it also work on Windows, where bin/ is called Scripts/.
2015-06-10 18:35:33 +02:00
Florian Bruhin
67473c6db1 tox: Add PYTHON to passenv. 2015-06-10 18:35:33 +02:00
Florian Bruhin
67e895b6c7 Hide SetProcessDpiAwareness Qt warning.
This shows up on AppVeyor CI for some reason.
See https://bugreports.qt.io/browse/QTBUG-38993
2015-06-10 18:35:33 +02:00
Florian Bruhin
645a1512dd tox: Update pyflakes to 0.9.1. 2015-06-10 06:10:12 +02:00
Florian Bruhin
4532176e7b Don't use substitutions in tox.ini.
These seem to break things on Ubuntu Trusty...
2015-06-09 19:12:19 +02:00
Florian Bruhin
d887623377 Make tests fail on unexpected Qt messages. 2015-06-07 02:34:19 +02:00
Florian Bruhin
a0e5a3e8ee tox: Update pytest-qt to 1.4.0.
Upstream changelog:

- Messages sent by qDebug, qWarning, qCritical are captured and displayed when
  tests fail, similar to pytest-catchlog. Also, tests can be configured to
  automatically fail if an unexpected message is generated. (See docs).
- New method waitSignals: will block untill all signals given are triggered, see
  docs (thanks @The-Compiler for idea and complete PR).
- New parameter raising to waitSignals and waitSignals: when True (defaults to
  False) will raise a qtbot.SignalTimeoutError exception when timeout is reached,
  see docs (thanks again to @The-Compiler for idea and complete PR).
- pytest-qt now requires pytest version >= 2.7.

Internal changes to improve memory management

- QApplication.exit() is no longer called at the end of the test session and
  the QApplication instance is not garbage collected anymore;
- QtBot no longer receives a QApplication as a parameter in the constructor,
  always referencing QApplication.instance() now; this avoids keeping an extra
  reference in the qtbot instances.
- deleteLater is called on widgets added in QtBot.addWidget at the end of each
  test;
- QApplication.processEvents() is called at the end of each test to make sure
  widgets are cleaned up;
2015-06-07 01:24:02 +02:00
Florian Bruhin
fd75f77108 Fix spell checker to check all files. 2015-06-07 01:24:02 +02:00
Florian Bruhin
d3f7d9319a tox: Update py to 1.4.28.
Upstream changelog:

- fix issue64 -- dirpath regression when "abs=True" is passed. Thanks Gilles
  Dartiguelongue.
2015-06-05 17:29:00 +02:00
Florian Bruhin
6ec8bbaca5 tox: Update pytest-mock to 0.6.0.
Upstream changelog:

- Two new auxiliary methods, spy and stub.
2015-06-05 17:27:59 +02:00
Florian Bruhin
e38169433e tox: Update pytest-flakes to 1.0.0.
Upstream changelog:

- Fix issue #6 - support PEP263 for source file encoding.
- Clarified license to be MIT like pytest-pep8 from which this is derived.
2015-06-05 17:26:49 +02:00
Florian Bruhin
4a909aa028 Use pylint's built-in checker to check for CRLF. 2015-06-04 15:25:36 +02:00
Florian Bruhin
36803cba06 Switch from flake8 to pytest-{mccabe,flakes,pep8}. 2015-06-02 20:51:06 +02:00
Florian Bruhin
534dbfc4c2 tox: Update check-manifest to 0.25.
Upstream changelog:

    Stop dynamic computation of install_requires in setup.py: this doesn't work
    well in the presence of the pip 7 wheel cache. Use PEP-426 environment
    markers instead (this means we now require setuptools version 0.7 or
    newer).
2015-05-27 08:51:24 +02:00
Florian Bruhin
6f3fa9dca6 tox: Show more information when testing. 2015-05-27 07:51:53 +02:00
Florian Bruhin
a969fe021d tox: Install requirements.txt for tests. 2015-05-27 07:45:21 +02:00
Florian Bruhin
92abf4bdf8 tox: Update pytest-html to 1.3.1.
Upstream changelog:

1.3.1:

Fix encoding issue in Python 3

1.3:

Bump version number to 1.3
Simplify example in README
Show extra content in report regardless of test result
Support extra content in JSON format
2015-05-26 19:25:45 +02:00
Florian Bruhin
0252f5fdbf tox: Update pytest-html to 1.2. 2015-05-20 13:37:44 +02:00
Florian Bruhin
daaf7a62c8 tox: Update pytest to 2.7.1. 2015-05-19 12:38:13 +02:00