summaryrefslogtreecommitdiff
path: root/pbr/tests/__init__.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-07-27 14:57:05 +0000
committerGerrit Code Review <review@openstack.org>2013-07-27 14:57:05 +0000
commit54ca83a2e87248420de873ca83a577cde3132711 (patch)
tree5a789b0ed077736c4eadf02dc65a8d2631acecdc /pbr/tests/__init__.py
parenta8cffe5bf56a151b919d1f2cba1a7e57e6204775 (diff)
parent761b27fee6ed0d3082d043dff2a7c61436a7aab9 (diff)
downloadpbr-54ca83a2e87248420de873ca83a577cde3132711.tar.gz
Merge "Add support for globbing in data files"
Diffstat (limited to 'pbr/tests/__init__.py')
-rw-r--r--pbr/tests/__init__.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/pbr/tests/__init__.py b/pbr/tests/__init__.py
index 14a5b5e..160743f 100644
--- a/pbr/tests/__init__.py
+++ b/pbr/tests/__init__.py
@@ -53,6 +53,21 @@ import testtools
from pbr import packaging
+class DiveDir(fixtures.Fixture):
+ """Dive into given directory and return back on cleanup.
+
+ :ivar path: The target directory.
+ """
+
+ def __init__(self, path):
+ self.path = path
+
+ def setUp(self):
+ super(DiveDir, self).setUp()
+ self.addCleanup(os.chdir, os.getcwd())
+ os.chdir(self.path)
+
+
class BaseTestCase(testtools.TestCase, testresources.ResourcedTestCase):
def setUp(self):