duplicity-team team mailing list archive
-
duplicity-team team
-
Mailing list archive
-
Message #00106
Re: Reorg of duplicity VCS directory structure
Ok;
I suggest the following (I've started a bit in my working copy):
* Change config.py.tmpl to be config.py, and have it
execfile('config_loca.py') if it exists. This allows putting your
own local configuration in a file which is not going to be a
perpertual "must not commit" working copy change, while still not
necessitating copying a template file in order to run tests with
default settings.
* Create a tests module (tests.py) which will provide an interface to
obtain a list of tests that need and not need root access.
* Create a base class for tests that need the 'testfiles' unapcked, which
will do so as part of setUp() and remove it as part of tearDown() (unless
some smart optimization is used this would mean redundant tarring
multiple times though). They would do this setup/teardown by assuming sudo
access, like the current shell scripts do.
* Extend each base class as appropriate.
* Provide convenience runners (testing/all_tests.py,
testing/indep_tests.py etc) for running all tests in a certain
category or all tests period.
The tests module would either not contain a list at all (and discovery
*_test.py files) or contain the "all tests" list and dynamically
discover which tests require root and which don't (by inspecting their
inheritance).
* I am also considering whether to put the tests in a duplicit.testing
package in order to make the coupling to local files less strict and
place it firmly inside duplicity to avoid clashes in some
situations. The testing/ directory would then only contain runnable
scripts, with the bulk of actual tests in duplicity/testing/*.py.
Thoughts?
--
/ Peter Schuller
PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller@xxxxxxxxxxxx>'
Key retrieval: Send an E-Mail to getpgpkey@xxxxxxxxx
E-Mail: peter.schuller@xxxxxxxxxxxx Web: http://www.scode.org
Attachment:
pgp4fkrxZtPoj.pgp
Description: PGP signature
Follow ups
References