Commit Graph

336 Commits

Author SHA1 Message Date
Florian Bruhin
07d31634c6 Add script to check for doc changes 2016-03-15 22:43:47 +01:00
Florian Bruhin
8a0d89d940 tox: Update Mako to 1.0.4
[test] [feature] The default test runner is now py.test. Running “python
setup.py test” will make use of py.test instead of nose. nose still works as a
test runner as well, however.

[lexer] [bug] Major improvements to lexing of intricate Python sections which
may contain complex backslash sequences, as well as support for the bitwise
operator (e.g. pipe symbol) inside of expression sections distinct from the
Mako “filter” operator, provided the operator is enclosed within parentheses or
brackets. Pull request courtesy Daniel Martin.

[feature] Added new method Template.list_defs(). Pull request courtesy Jonathan
Vanasco.
2016-03-11 06:55:05 +01:00
Florian Bruhin
a94abb0858 tox: Update CherryPy to 5.1.0
* Bugfix for ``test_HTTP11_pipelining`` test in Python 3.5
* Bugfix regarding the keyword arguments support for Python 3 on the config
  file.
* Bugfix for ``test_2_KeyboardInterrupt`` test in Python 3.5.
  by monkey patching the HTTPRequest given a bug on CPython
  that is affecting the testsuite (https://bugs.python.org/issue23377).
* Add additional parameter ``raise_subcls`` to the tests helpers
  `openURL` and ``CPWebCase.getPage`` to have finer control on
  which exceptions can be raised.
* Add support for direct keywords on the calls (e.g. ``foo=bar``) on
  the config file under Python 3.
* Add additional validation to determine if the process is running
  as a daemon on ``cherrypy.process.plugins.SignalHandler`` to allow
  the execution of the testsuite under CI tools.
2016-03-11 06:53:52 +01:00
Florian Bruhin
119f01bd5f tox: Add {posargs} to pylint envs 2016-03-10 20:11:15 +01:00
Florian Bruhin
82b52d8799 tox: Rename pylint-tip to pylint-master 2016-03-10 20:11:15 +01:00
Florian Bruhin
c681d6203f tox: Add missing requests dependency for pylint-tip 2016-03-10 20:11:15 +01:00
Florian Bruhin
146c44b351 tox: Update pylint-tip repo to github 2016-03-10 20:11:15 +01:00
Florian Bruhin
c28dbe84f7 tox: Update pyroma to 2.0.2
- Faked the __name__ variable to allow you to have a "if __name__" construct
  in the setup.py.
- Fixed a bug under Python 3 with certain imports.
2016-03-06 16:45:41 +01:00
Florian Bruhin
3a76df3fd0 tox: Update hypothesis to 3.1.0
- Add a 'nothing' strategy that never successfully generates values.
- sampled_from() and one_of() can both now be called with an empty argument
  list, in which case they also never generate any values.
- one_of may now be called with a single argument that is a collection of
  strategies as well as as varargs.
- Add a 'runner' strategy which returns the instance of the current test object
  if there is one.
- 'Bundle' for RuleBasedStateMachine is now a normal(ish) strategy and can be
  used as such.
- Tests using RuleBasedStateMachine should now shrink significantly better.
- Hypothesis now uses a pretty-printing library internally, compatible with
  IPython's pretty printing protocol (actually using the same code). This may
  improve the quality of output in some cases.
- As a 'phases' setting that allows more fine grained control over which parts
  of the process Hypothesis runs
- Add a suppress_health_check setting which allows you to turn off specific
  health checks in a fine grained manner.
- Fix a bug where lists of non fixed size would always draw one more element
  than they included. This mostly didn't matter, but if would cause problems
  with empty strategies or ones with side effects.
- Add a mechanism to the Django model generator to allow you to explicitly
  request the default value (thanks to Jeremy Thurgood for this one).
2016-03-06 16:43:42 +01:00
Florian Bruhin
38c17af191 tox: Update flake8-pep3101 to 0.3
- Allow stdin processing, this way text editor can pass input to flake8.
2016-03-06 16:42:52 +01:00
Florian Bruhin
7e3337a901 tox: Update pyflakes to 1.1.0 2016-03-02 08:18:37 +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
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
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
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
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
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
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
Florian Bruhin
0b362e76ea Move pylint plugins to an installed package.
This means we can now run things like running pylint --version without having
to set PYTHONPATH correctly now.

When using skip_install=true, the plugins wouldn't work as they need to import
qutebrowser.

We have to keep setting PYTHONPATH in run_pylint_on_tests.py, otherwise we get
this error I don't quite understand:

    F:  1, 0: error while code parsing: Unable to load file
    '/home/florian/proj/qutebrowser/git/__init__.py' ([Errno 2] No such
    file or directory: '...') (parse-error)
2016-02-19 07:15:09 +01:00
Florian Bruhin
0c4a961505 tox: Upgrade hypothesis to 3.0.2.
(3.0.2: performance fix)

------------------
3.0.1 - 2016-02-18
------------------

* Fix a case where it was possible to trigger an "Unreachable" assertion when
  running certain flaky stateful tests.
* Improve shrinking of large stateful tests by eliminating a case where it was
  hard to delete early steps.
* Improve efficiency of drawing binary(min_size=n, max_size=n) significantly by
  provide a custom implementation for fixed size blocks that can bypass a lot
  of machinery.
* Set default home directory based on the current working directory at the
  point Hypothesis is imported, not whenever the function first happens to be
  called.

------------------
3.0.0 - 2016-02-17
------------------

Codename: This really should have been 2.1.

Externally this looks like a very small release. It has one small breaking change
that probably doesn't affect anyone at all (some behaviour that never really worked
correctly is now outright forbidden) but necessitated a major version bump and one
visible new feature.

Internally this is a complete rewrite. Almost nothing other than the public API is
the same.

New features:

* Addition of data() strategy which allows you to draw arbitrary data interactively
  within the test.
* New "exploded" database format which allows you to more easily check the example
  database into a source repository while supporting merging.
* Better management of how examples are saved in the database.
* Health checks will now raise as errors when they fail. It was too easy to have
  the warnings be swallowed entirely.

New limitations:

* choices and streaming strategies may no longer be used with find(). Neither may
  data() (this is the change that necessitated a major version bump).

Feature removal:

* The ForkingTestCase executor has gone away. It may return in some more working
  form at a later date.

Performance improvements:

* A new model which allows flatmap, composite strategies and stateful testing to
  perform *much* better. They should also be more reliable.
* Filtering may in some circumstances have improved significantly. This will
  help especially in cases where you have lots of values with individual filters
  on them, such as lists(x.filter(...)).
* Modest performance improvements to the general test runner by avoiding expensive
  operations

In general your tests should have got faster. If they've instead got significantly
slower, I'm interested in hearing about it.

Data distribution:

The data distribution should have changed significantly. This may uncover bugs the
previous version missed. It may also miss bugs the previous version could have
uncovered. Hypothesis is now producing less strongly correlated data than it used
to, but the correlations are extended over more of the structure.

Shrinking:

Shrinking quality should have improved. In particular Hypothesis can now perform
simultaneous shrinking of separate examples within a single test (previously it
was only able to do this for elements of a single collection). In some cases
performance will have improved, in some cases it will have got worse but generally
shouldn't have by much.
2016-02-18 20:46:15 +01:00
Florian Bruhin
5c617b861c Switch to pytest-xvfb. Fixes #1309. 2016-02-16 20:36:23 +01:00
Florian Bruhin
3aaa4395b8 tox: Update Werkzeug to 0.11.4.
- Fixed werkzeug.serving not working from -m flag.
- Fixed incorrect weak etag handling.
2016-02-15 07:08:31 +01:00
Florian Bruhin
8534010f02 tox: Update flake8 to 2.5.4.
Actually parse output_file and enable_extensions from config files.
2016-02-11 19:29:05 +01:00
Florian Bruhin
5311576c34 Check pep257 via flake8.
We'll still keep the pydocstyle environment though until flake8-pep257 adds
support for that:

https://github.com/Robpol86/flake8-pep257/issues/6
2016-02-10 19:18:47 +01:00
Florian Bruhin
d6267c30f6 tox: Update decorator to 4.0.9.
No changes.
2016-02-08 23:46:41 +01:00
Florian Bruhin
5ae677376b Rerun TestPyQIODevice.test_qprocess if needed.
This adds a new pytest-rerunfailures dependency. For some reason, that test
sometimes fails with an empty string read, and I can't tell why.
2016-02-08 06:54:47 +01:00
Florian Bruhin
c332db4703 tox: Update decorator to 4.0.8.
Switched to a new changelog format (the one in http://keepachangelog.com/)
since it was contributed by Alexander Artemenko. Re-added a newline to support
old version of Python, as requested by azjps.
2016-02-07 17:57:39 +01:00
Florian Bruhin
66f52dbd86 tox: Update wheel to 0.29.0.
- Fix compression type of files in archive
2016-02-07 12:31:08 +01:00
Florian Bruhin
e3508cc37c tox: Filter decorator==4.0.7 for requirements.io.
See https://github.com/micheles/decorator/issues/25
2016-02-07 12:13:51 +01:00
Florian Bruhin
8f74734718 tox: Update cherrypy to 5.0.1.
* Removed deprecated support for ``ssl_certificate`` and
  ``ssl_private_key`` attributes and implicit construction
  of SSL adapter on Python 2 WSGI servers.
* Default SSL Adapter on Python 2 is the builtin SSL adapter,
  matching Python 3 behavior.
* In proxy tool, defer to Host header for resolving the base if no base is
  supplied.
2016-02-06 16:35:29 +01:00
Florian Bruhin
7ef368fc13 tox: Update wheel to 0.28.0.
- Fix file modes in archive
- Support forcing a platform tag using –plat-name on pure-Python wheels, as
  well as nonstandard platform tags on non-pure wheels
- Add SOABI tags to platform-specific wheels built for Python 2.X
- Support reproducible wheel files, wheels that can be rebuilt and will hash to
  the same values as previous builds
- Support for changes in keyring >= 8.0
- Use the file context manager when checking if dependency_links.txt is empty,
  fixes problems building wheels under PyPy on Windows
- Don’t attempt to (recursively) create a build directory ending with ..
  (invalid on all platforms, but code was only executed on Windows)
- Added the PyPA Code of Conduct
2016-02-06 16:33:37 +01:00
Florian Bruhin
30f68e55d6 tox: Update xvfbwrapper to 0.2.8.
- better error handling when xvfb is not installed
- don't hardcode tmp dir location
- use terminate instead of kill so Xvfb can clean up lock files
2016-01-31 13:06:28 +01:00
Florian Bruhin
bf2adf19b2 tox: Update pytest-cov to 2.2.1.
- Fixed incorrect merging of coverage data when xdist was used and coverage was
  >= 4.0.
2016-01-30 23:39:55 +01:00
Florian Bruhin
c9deee0835 tox: Update flake8 to 2.5.2.
- Parse output_file and enable_extensions from config files
- Raise upper bound on mccabe plugin to allow for version 0.4.0
2016-01-30 23:39:55 +01:00
Florian Bruhin
67fd94b189 tox: Update check-manifest to 0.31.
- Drop Python 3.2 support.
- Ignore commented-out lines in MANIFEST.in.
2016-01-30 23:39:55 +01:00
Florian Bruhin
dc07f7ca9b Add a .pydocstylerc. 2016-01-30 23:39:55 +01:00
Florian Bruhin
39ca471685 tox: Switch from pep257 to pydocstyle.
Major Updates
-------------

The project was renamed to pydocstyle and the new release will be 1.0.0!

New Features
------------

- Added support for Python 3.5.
- Classes nested inside classes are no longer considered private. Nested
  classes are considered public if their names are not prepended with an
  underscore and if their parent class is public, recursively.
- Added the D403 error code - "First word of the first line should be properly
  capitalized". This new error is turned on by default.
- Added support for .pydocstylerc and as configuration file name.

Bug Fixes
---------

- Fixed an issue where a NameError was raised when parsing complex definitions
  of __all__.
- Fixed a bug where D202 was falsely reported when a function with just a
  docstring and no content was followed by a comment.
- Fixed wrong __all__ definition in main module.
- Fixed a bug where an AssertionError could occur when parsing __future__
  imports.
2016-01-30 23:23:21 +01:00
Florian Bruhin
6af1cce45f tox: Update pytest-mock to 0.10.1.
- Fix regression in frozen tests due to distutils import dependency.
- Fix regression when using pytest-mock with pytest-2.7.X.
2016-01-28 06:22:00 +01:00
Florian Bruhin
b4972b3c08 tox: Update pytest-mock to 0.10.0.
pytest-mock now monkeypatches the mock library to improve pytest output
for failures of mock call assertions like Mock.assert_called_with().
2016-01-27 22:32:21 +01:00
Florian Bruhin
2b6d35b987 tox: Update mccabe to 0.4.0.
- Stop testing on Python 3.2
- Add support for async/await keywords on Python 3.5 from PEP 0492
2016-01-27 22:30:58 +01:00
Florian Bruhin
dcd62abe2b tox: Update httpbin to 0.4.1.
Added floating-point support for /delay endpoint
2016-01-27 22:20:07 +01:00
Florian Bruhin
959e96f05a tox: Update ebb-lint to 0.4.4
- Read from stdin
- Strip trailing whitespace and \ before tokenizing.
- EOF bug?
2016-01-27 06:41:00 +01:00
Florian Bruhin
8e5014fc0f tox: Update pytest to 2.8.7.
- use predictable object resolution for monkeypatch

- allow for double nodeids in junitxml,
  this was a regression failing plugins combinations like pytest-pep8 +
  pytest-flakes

- Workaround for exception that occurs in pyreadline when using ``--pdb`` with
  standard I/O capture enabled.

- Better error message in case the target of a ``monkeypatch`` call raises an
  ``ImportError``.

- monkeypatch calls (setattr, setenv, etc.) are now O(1).

- captured stdout and stderr are now properly displayed before entering pdb
  when ``--pdb`` is used instead of being thrown away.

- pytest warnings emitted during ``pytest_terminal_summary`` are now properly
  displayed.

- fixed internal UnicodeDecodeError when doctests contain unicode.

- Add captured stdout to jUnit XML report on setup error.
2016-01-25 06:11:09 +01:00
Florian Bruhin
e9662b71f0 Move pytest arguments to pytest.ini.
Closes #1260.
2016-01-24 21:10:22 +01:00
Florian Bruhin
95fe54f010 Avoid running coverage when it's unneeded.
Unfortunately running coverage means our tests need more than a minute longer
to run.

We still run it in the following scenarios:
    - Full 'tox' run
    - On Travis CI on Linux
    - On the buildbot on Archlinux

But not anymore in the following scenarios:
    - When running 'tox -e py35' (or py34)
    - On Travis CI on OS X
    - On AppVeyor
    - On the buildbot except on Archlinux
2016-01-24 20:17:28 +01:00
Florian Bruhin
90c34bce17 tox: Filter pytest 2.8.6 for requirements.io. 2016-01-24 18:32:24 +01:00