At once, we added $SPHINX_TEST_TEMPDIR to keep intermediate files of
testing to investigate the failures. At present, we've used pytest
as a test runner. And it keeps temporary directories of last 3
testings. So this starts to use it instead of $SPHINX_TEST_TEMPDIR.
https://docs.pytest.org/en/latest/tmpdir.html#the-default-base-temporary-directory
The bindep (BINary DEPendency automation) tool is a tool for checking
the presence of binary packages needed to use an application / library.
Use it to specify the dependencies needed to successfully pass the LaTex
tests. Only Fedora targets are currently provided.
Signed-off-by: Stephen Finucane <stephen@that.guru>
https://tox.readthedocs.io/en/latest/config.html#conf-extras
> extras(MULTI-LINE-LIST)
>
> New in version 2.4.
>
> A list of “extras” to be installed with the sdist or develop install.
> For example, extras = testing is equivalent to [testing] in a pip
> install command.
Since tox-3.2.0, 'usedevelop' option and 'deps=.[test,websupport]'
option have been conflicted. As a workaround, this adds
'install_command' option to avoid the situation.
The demise of Python 2.7 is not far off and we intend to drop support
for it in Sphinx 2.0. As a result, there probably isn't a better time
than now to start testing with Python 3 by default. There are a couple
of advantages to this:
- flake8 is stricter under Python 3 and we don't need to ignore files
with Python 3 syntax
- We get to dogfood Sphinx against its own documentation using Python 3
- pylint gains support for Python 3 syntax
Signed-off-by: Stephen Finucane <stephen@that.guru>
distutils/__init__.py:4: DeprecationWarning: the imp module is
deprecated in favour of importlib; see the module's documentation
for alternative uses
import imp
Signed-off-by: Stephen Finucane <stephen@that.guru>
Given that we install Sphinx as part of the dependencies, there's no
reason to do it twice. Skip that step.
Signed-off-by: Stephen Finucane <stephen@that.guru>
There's an issue with 'pkgutils' and namespace packages. This has been
reported against setuptools [1], but until this is resolved, we simply
need to live with it. Ensure said warnings are filtered from tox too and
remove some unnecessary ones.
[1] https://github.com/pypa/setuptools/issues/1111
Signed-off-by: Stephen Finucane <stephen@that.guru>
This is no longer necessary. One test needs to be modified to deal with
how 'python -m pytest' modifies the PATH.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Run 'coverage report' after a successful coverage run. There's enough
coverage-related stuff here at this point to warrant its own section.
Signed-off-by: Stephen Finucane <stephen@that.guru>
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>
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>
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>
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>
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>