diff options
| author | Barry Warsaw | 2010-08-30 11:03:00 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2010-08-30 11:03:00 -0400 |
| commit | 6e40cd75cd88ef930ced8c1df15ebc93dbf683d4 (patch) | |
| tree | 518a0685cc0f490453d921ef5af3c8f4bc824a3f /src/mailman/testing/layers.py | |
| parent | 4c8497c350f93ef4a6b6ccf6ebd45abb03fd4d8e (diff) | |
| download | mailman-6e40cd75cd88ef930ced8c1df15ebc93dbf683d4.tar.gz mailman-6e40cd75cd88ef930ced8c1df15ebc93dbf683d4.tar.zst mailman-6e40cd75cd88ef930ced8c1df15ebc93dbf683d4.zip | |
Diffstat (limited to 'src/mailman/testing/layers.py')
| -rw-r--r-- | src/mailman/testing/layers.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mailman/testing/layers.py b/src/mailman/testing/layers.py index 34dc46807..8f16d5940 100644 --- a/src/mailman/testing/layers.py +++ b/src/mailman/testing/layers.py @@ -217,6 +217,21 @@ class ConfigLayer(MockAndMonkeyLayer): if len(os.environ.get('MM_VERBOSE_TESTLOG', '').strip()) > 0: cls.stderr = True + # The top of our source tree, for tests that care (e.g. hooks.txt). + root_directory = None + + @classmethod + def set_root_directory(cls, directory): + """Set the directory at the root of our source tree. + + zc.recipe.testrunner runs from parts/test/working-directory, but + that's actually changed over the life of the package. Some tests + care, e.g. because they need to find our built-out bin directory. + Fortunately, buildout can give us this information. See the + `buildout.cfg` file for where this method is called. + """ + cls.root_directory = directory + class SMTPLayer(ConfigLayer): |
