aboutsummaryrefslogtreecommitdiff
path: root/hwpack
diff options
context:
space:
mode:
authorGuilherme Salgado <salgado@canonical.com>2010-12-16 15:24:00 -0200
committerGuilherme Salgado <salgado@canonical.com>2010-12-16 15:24:00 -0200
commitb4a96d9f15200a69ca02555657c7b6320fdc1f17 (patch)
treec116f7d1831d04d94f545acb90e76619c4bbb33a /hwpack
parent0d4860aeaa5626e8e249bf7bed5072e8dce71e2d (diff)
Port populate_rootfs to python
Diffstat (limited to 'hwpack')
-rw-r--r--hwpack/testing.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/hwpack/testing.py b/hwpack/testing.py
index f0508e1..f93f798 100644
--- a/hwpack/testing.py
+++ b/hwpack/testing.py
@@ -161,12 +161,12 @@ class TestCaseWithFixtures(TestCase):
fixture.setUp()
return fixture
- def createTempFileAsFixture(self, prefix='tmp'):
+ def createTempFileAsFixture(self, prefix='tmp', dir=None):
"""Create a temp file and make sure it is removed on tearDown.
:return: The filename of the file created.
"""
- _, filename = tempfile.mkstemp(prefix=prefix)
+ _, filename = tempfile.mkstemp(prefix=prefix, dir=dir)
self.addCleanup(os.unlink, filename)
return filename