Commit Graph

183 Commits

Author SHA1 Message Date
Stephen Finucane
a3f9935d95 travis: Enable codecov coverage
This necessitates adding some basic coverage-py configuration [1] and
making sure the pytest-cov plugin uses said configuration [2]. Badges
are included.

Note that we do not run the 'coverage' tox target, which is reserved for
users.

[1] https://github.com/codecov/example-python
[2] https://bitbucket.org/ned/coveragepy/issues/512/

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-24 21:24:41 +00:00
Stephen Finucane
411055905c tox: Add 'PERL5LIB' to 'passenv' list
This is required by 'makeinfo'.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes #4339
2017-12-24 14:47:31 +00:00
Stephen Finucane
a2a873d58a tox: Add documentation for all targets
This should make 'tox -av' more helpful.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-19 15:55:10 +00:00
Stephen Finucane
fd1df0815b tox: Make further use of factor-conditional deps
This is how we reduce boilerplate [1]. Succinctness FTW.

[1] https://tox.readthedocs.io/en/latest/config.html#factors-and-factor-conditional-settings

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-18 20:10:18 +00:00
Stephen Finucane
5d812ccefc tox: Add 'coverage' target
Enabling coverage results in an increase in runtime, and while this may
be an acceptable compromise for some developers, it's not necessarily
something we need to run all the time. Move it to a separate target so
it can be run only by those who wish to use it.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-18 20:10:18 +00:00
Stephen Finucane
e243e82723 tests: Ignore tests using 'collect_ignore'
Per the pytest docs [1], this is the preferred way to ignore tests. This
necessitates removing the 'test-async' target as it no longer makes any
sense.

[1] https://docs.pytest.org/en/latest/example/pythoncollection.html

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-18 20:10:18 +00:00
Stephen Finucane
a102e8e29b setup.py: Include 'flake8' in 'test' requirements
We are using this in our testing and actually need it for the flake8
plugin, so include this in the list of 'test' requirements.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-18 19:44:05 +00:00
Stephen Finucane
67753b7ce3 Remove 'test-reqs.txt'
We were never really using this file for its specified purpose [1]. Now
that we have everything cleanly organized in 'setup.py', there really
isn't any reason to keep it around. Remove it.

[1] https://caremad.io/posts/2013/07/setup-vs-requirement/

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-10 14:13:09 +01:00
Stephen Finucane
eb8efce7d8 requirements: Reduce duplication
Simply installing packages will ensure that most of the dependencies in
'setup.py' are installed, meaning 'test-reqs.txt' need only contain
those necessary for testing.

The only notable change is that the 'simplejson' module is dropped from
the requirements list. This included as a dependency for the PyPy
target, but it appears that this is not necessary today (though it may
have been when the target was added in 2011).

This retains 'setup.py test' which, as noted in the tox docs [1], is
sometimes expected for downstream distribution testing. We may wish to
find a way to synchronize requirements between 'test-reqs.txt' and this
section in the future, but that's work for another day.

[1] https://tox.readthedocs.io/en/latest/example/basic.html#integration-with-setup-py-test-command

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-10 14:06:10 +01:00
Stephen Finucane
6086d7b608 tox: Don't bother setting 'PYTHONDONTWRITEBYTECODE'
As I've previously discovered [1], this doesn't actually do anything in
modern tox. Simply remove it.

[1] https://review.openstack.org/#/c/369986/

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 09:59:08 +01:00
Stephen Finucane
e023c296e8 tox: Pass posargs to docs
This allows us to do something like the following:

  tox -e docs -- -b man

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 09:59:08 +01:00
Stephen Finucane
40c8f661ef tox: Ensure 'mypy' targets runs with Python 3.x
Turns out this requires Python 3.2 at a minimum. Who knew? We don't
support Python 3.1 so simply fix to 'python3'.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 09:59:08 +01:00
Stephen Finucane
71a5ec18be tox: Always show 25 slowest tests
pytest supports this natively [1] and this is what is currently used by
Travis. There's value in seeing similar data locally.

[1] https://docs.pytest.org/en/latest/usage.html#profiling-test-execution-duration

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 09:57:58 +01:00
Stephen Finucane
6d6d3a40f1 tox: Always run coverage
There is value in examining coverage for something like Sphinx. Start
doing this by default, in anticipation of increasing coverage over time.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 09:18:20 +01:00
Stephen Finucane
c5dec1b6a9 tox: Add pylint target to tox
This isn't enabled by default because it throws so many damn errors.
Perhaps we should simply remove this?

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 09:18:20 +01:00
Takuya Noguchi
3e94878871 Add support for docutils 0.14 2017-09-10 09:23:09 +09:00
Bernat Gabor
7697683b3d add proxy to tox, so the tests can succeed even behind a proxy network 2017-07-26 20:09:33 +01:00
Takeshi KOMIYA
0135948485 Fix #3683: sphinx.websupport module is not provided by default 2017-05-03 23:00:03 +09:00
Takeshi KOMIYA
b9b982d5f0 Fix dependency errors 2017-04-30 01:04:30 +09:00
Takeshi KOMIYA
13e7ae2f1f Revert "Add dependency (temporary)"
This reverts commit 56f51cb6aa.
2017-04-23 21:04:40 +09:00
Takeshi KOMIYA
56f51cb6aa Add dependency (temporary) 2017-04-22 17:54:21 +09:00
Takeshi KOMIYA
c0a39eb3f7 Simplify testcases for websupport
Now websupport modules has separated and move into
sphinxcontrib-websupport package.  They are also tested in the
package.  Hence, we should test the bridge code for them.
2017-04-22 17:54:20 +09:00
Stephen Finucane
8b500fe383 tox: Add 'mypy' target
Like the recently added 'docs' target, this is easier than creating a
virtualenv, installing deps and running make.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-02-28 17:32:34 +00:00
Stephen Finucane
020e77b794 tox: Add 'docs' target
This is easier than creating a virtualenv, installing deps and running
make. It also makes explicit use of the setuptool integration that is
now documented.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-02-24 13:41:46 -05:00
Takeshi KOMIYA
b2d8803545 Upgrade to newest mypy package 2017-02-21 14:05:18 +09:00
Takeshi KOMIYA
5c72b8cf47 Merge branch 'stable' 2017-01-07 15:36:55 +09:00
Takeshi KOMIYA
5cff4b15c2 Fix tox.ini for pytest 2017-01-07 15:36:07 +09:00
Takeshi KOMIYA
bd382528d0 Merge branch 'stable' 2016-12-25 12:40:27 +09:00
Takeshi KOMIYA
a5b15195e2 Add du13 target to tox.ini 2016-12-25 12:22:54 +09:00
Takeshi KOMIYA
934ec657d4 Remove unsupported platform from tox.ini 2016-12-25 12:19:16 +09:00
Takeshi KOMIYA
36eab77c3d Add py36 support 2016-12-25 12:19:15 +09:00
Takeshi KOMIYA
866da5a8d0 Clarify test command (refs: #3264) 2016-12-24 23:51:30 +09:00
Takeshi KOMIYA
7ab20262ff Set PYTHONDONTWRITEBYTECODE=true on testing (refs: #3264) 2016-12-24 22:23:49 +09:00
Takeshi KOMIYA
8dcc3a259c Fix 'tox -e du12' fails (refs: #3264) 2016-12-24 19:30:32 +09:00
Takeshi KOMIYA
f65c5ee3de Install enum34 on testing pypy (refs: #3264) 2016-12-24 19:30:32 +09:00
shimizukawa
0a7d039df5 Merge branch '1.5-release' into master 2016-12-05 23:14:25 +09:00
shimizukawa
1c8935adae Inprovement of warnings mechanism. Now support disabling emit warnings and add documentation. 2016-12-04 18:05:16 +09:00
Takeshi KOMIYA
db732ac0b8 Prepare to type-check using mypy 2016-11-16 12:05:44 +09:00
Takeshi KOMIYA
e5786b888c Merge branch 'stable' into 1.5-release 2016-11-13 11:19:26 +09:00
Takeshi KOMIYA
4ca84aba45 Fix #3135: `sphinx.ext.autodoc` crashes with plain Callable 2016-11-13 00:01:41 +09:00
Takeshi KOMIYA
a880d0e84e Fix #3114: Install enum34 to test autodoc on py27 2016-11-02 21:35:50 +09:00
shimizukawa
487f3db5f6 To simplify, sphinx uses external mock package even if unittest.mock exists. 2016-10-15 16:22:27 +09:00
Takeshi KOMIYA
c147f6496e Fix #2919: Drop py26 support 2016-09-15 22:47:47 +09:00
Takeshi KOMIYA
1da1a71511 Drop python 3.3 support 2016-08-30 00:43:15 +09:00
Takeshi KOMIYA
2ccb75c98f Bundle sphinx/pycode/Grammar-*.pickle (ref: #2765)
So far, sphinx generates the grammar files on demand.
It causes uninstallation does not remove whole of files.
With this fix, Sphinx bundles the files in the package.
2016-07-12 12:15:12 +09:00
Takeshi KOMIYA
5f7b393d1c Add html5lib to tox.ini 2016-06-12 00:43:23 +09:00
Alberto Berti
782310039b Move py3.5 specific tests to their own file and adjust test environment 2015-11-10 03:40:48 +01:00
shimizukawa
5b7ce8d9c2 avoid py3 syntax module 2015-09-13 09:16:08 +09:00
shimizukawa
caed7faa19 add flake8 testing 2015-03-07 17:59:28 +09:00
Georg Brandl
d47a7587f9 Complete test suite overhaul.
* rename a few test modules to make the names more consistent

* do not copy/use Sphinx from build/ (unnecessary without 2to3)

* use a temporary dir for *all* test projects, the source tree
  will stay pristine that way  (default is tests/build)

* speed up tests by ~3x by splitting up test projects and avoiding
  rebuilds
2014-09-21 17:17:02 +02:00