subiquity/subiquitycore
Scott Moser 51a7169904 tox: Support running tests and flake8 in tox.
This puts into place a tox.ini for running unit tests without
a large amount of deps installed into the system. For example,
we did not want to need libnl-route-3-dev or build-essential installed
in the system in order to run unit tests.

In order avoid import errors in the modules due to these missing
dependencies, we have added a 'fake_deps/' directory that provides
mock'd objects of the dependencies that were used.

The only installed packages necessary for this to run should be
tox itself and its dependencies (pip and friends).  From a clean new
container we can then do:
  apt-get install tox
  git clone ...
  tox

Also along the way:
 * adjust setup.py to only need the DistUtilsExtra during 'build'.
   This means tox usage doesn't require python3-distutils-extra.
 * drop use of lsb_release in favor of built-in parsing.
   This python module wasn't doing much.  We can parse /etc/lsb-release
   ourselves with less footprint.  Also part of the motivation for this
   is that lsb_release was not on pypi.
 * replace use of StorageInfo in test_partition.py with a FakeStorageInfo
 * .gitignore: ignore only the top level 'probert' directory so that
   we can track fake_deps/probert.
 * fix a couple escape chars, by using raw strings (r'').
 * adjust gettext to return un-modified strings rather than '_(string)',
   but support old style if FAKE_TRANSLATE=mangle.
2018-06-05 17:59:46 -04:00
..
controllers Drop mis-merged code from rebase 2018-05-24 16:59:31 -05:00
models pep8 fixes for subiquitycore.models.network 2018-05-24 16:51:51 -05:00
testing pep8 fixes for subiquitycore.testing.view_hewlpers 2018-05-24 16:51:51 -05:00
ui use general machinery a little more 2018-05-31 10:28:29 +12:00
__init__.py pyflakes3 fixes for subiquitycore/__init__.py 2018-05-24 16:59:31 -05:00
controller.py pep8 fixes for subiquitycore/controller.py 2018-05-24 16:51:51 -05:00
core.py pep8 fixes for subiquitycore/core.py 2018-05-24 16:59:31 -05:00
i18n.py tox: Support running tests and flake8 in tox. 2018-06-05 17:59:46 -04:00
log.py Drop commented out / dead code 2018-05-23 18:53:12 -05:00
lsb_release.py tox: Support running tests and flake8 in tox. 2018-06-05 17:59:46 -04:00
prober.py pep8 fixes for subiquitycore/prober.py 2018-05-24 16:51:51 -05:00
signals.py Drop commented out / dead code 2018-05-23 18:53:12 -05:00
tasksequence.py pep8 fixes for subiquitycore/tasksequence.py 2018-05-24 16:59:31 -05:00
utils.py pep8 fixes for subiquitycore/utils.py 2018-05-24 16:51:51 -05:00
view.py pep8 fixes for subiquitycore/view.py 2018-05-24 16:51:51 -05:00