summaryrefslogtreecommitdiffstats
path: root/QMTest/TestCmd.py
diff options
context:
space:
mode:
Diffstat (limited to 'QMTest/TestCmd.py')
-rw-r--r--QMTest/TestCmd.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/QMTest/TestCmd.py b/QMTest/TestCmd.py
index 08642cb..f5e1c71 100644
--- a/QMTest/TestCmd.py
+++ b/QMTest/TestCmd.py
@@ -48,6 +48,8 @@ things. Here is an overview of them:
test.subdir('subdir', ...)
+ test.rmdir('subdir', ...)
+
test.write('file', "contents\n")
test.write(['subdir', 'file'], "contents\n")
@@ -179,8 +181,8 @@ version.
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
__author__ = "Steven Knight <knight at baldmt dot com>"
-__revision__ = "TestCmd.py 0.26.D001 2007/08/20 21:58:58 knight"
-__version__ = "0.26"
+__revision__ = "TestCmd.py 0.30.D001 2007/10/01 16:53:55 knight"
+__version__ = "0.30"
import os
import os.path
@@ -690,6 +692,17 @@ class TestCmd:
raise ValueError, "mode must begin with 'r'"
return open(file, mode).read()
+ def rmdir(self, dir):
+ """Removes the specified dir name.
+ The dir name may be a list, in which case the elements are
+ concatenated with the os.path.join() method. The dir is
+ assumed to be under the temporary working directory unless it
+ is an absolute path name.
+ The dir must be empty.
+ """
+ dir = self.canonicalize(dir)
+ os.rmdir(dir)
+
def run(self, program = None,
interpreter = None,
arguments = None,