summaryrefslogtreecommitdiff
path: root/xnt/tests
diff options
context:
space:
mode:
authorkennyballou <kballou@onyx.boisestate.edu>2013-01-10 10:48:54 -0700
committerkballou <kballou@onyx.boisestate.edu>2013-01-10 10:48:54 -0700
commit8506e376297171fb7995cc87d65ddee73c82b8eb (patch)
treed1c70670bf103d367ec97d08b3e6f176ec7259ed /xnt/tests
parent73751158c29a4195c798ed304b72f7015c188892 (diff)
downloadxnt-8506e376297171fb7995cc87d65ddee73c82b8eb.tar.gz
xnt-8506e376297171fb7995cc87d65ddee73c82b8eb.tar.xz
Add fileset copy ability to xnt.tasks.cp
Diffstat (limited to 'xnt/tests')
-rw-r--r--xnt/tests/taskcopytests.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/xnt/tests/taskcopytests.py b/xnt/tests/taskcopytests.py
index 460ea90..bb9af9c 100644
--- a/xnt/tests/taskcopytests.py
+++ b/xnt/tests/taskcopytests.py
@@ -44,6 +44,17 @@ class TaskCopyTests(unittest.TestCase):
with open("temp/testfile5", "r") as testfile:
self.assertEqual("this is a test file", testfile.read())
+ def test_cp_filelist(self):
+ xnt.tasks.cp(dst="temp/testfolder2",
+ files=["temp/testfile1",
+ "temp/testfile2",
+ "temp/testfile3"])
+ self.assertTrue(os.path.exists("temp/testfile1"))
+ self.assertTrue(os.path.exists("temp/testfile2"))
+ self.assertTrue(os.path.exists("temp/testfile3"))
+ with open("temp/testfile2", "r") as testfile:
+ self.assertEqual("this is a test file", testfile.read())
+
if __name__ == "__main__":
unittest.main()