aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2016-12-13 01:31:07 +0100
committerBryn M. Reeves <bmr@redhat.com>2017-03-28 14:12:07 +0100
commite12cc14c9bd8af5c03050de6c1934d52c566958f (patch)
treedcf4d1cf32874916a27533b8bf4c1c73b5b63dec
parent8532e9c47939b872df8cb78f09b49ac5a57b62fd (diff)
downloadsos-e12cc14c9bd8af5c03050de6c1934d52c566958f.tar.gz
[plugins] add optional dir arg to create_file in plugin_tests
Signed-off-by: Michael Adam <obnox@samba.org>
-rw-r--r--tests/plugin_tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py
index 14d3b49c..ae8db065 100644
--- a/tests/plugin_tests.py
+++ b/tests/plugin_tests.py
@@ -18,8 +18,8 @@ PATH = os.path.dirname(__file__)
def j(filename):
return os.path.join(PATH, filename)
-def create_file(size):
- f = tempfile.NamedTemporaryFile(delete=False)
+def create_file(size, dir=None):
+ f = tempfile.NamedTemporaryFile(delete=False, dir=dir)
f.write(six.b("*" * size * 1024 * 1024))
f.flush()
f.close()