1. marchael
  2. moin-2.0

Commits

pkumar  committed 1476764

added test_dir_exist to raise error if dir already exist in util/test_filesys.py

  • Participants
  • Parent commits 069bb27
  • Branches pytest2

Comments (0)

Files changed (1)

File MoinMoin/util/_tests/test_filesys.py

View file
         filesys.copytree(self.test_dir, self.test_dest_dir)
         # check for the dir contents
         assert os.listdir(self.test_dir) == os.listdir(self.test_dest_dir)        
+
+    def test_dir_exist(self):
+        """ raise Error if dir already exist """
+        self.makefile(self.src1, 'src1')
+        self.test_dest_dir = tempfile.mkdtemp('', 'temp_dir')
+        with pytest.raises(OSError):
+            filesys.copytree(self.test_dir, self.test_dest_dir)
+        
         
 coverage_modules = ['MoinMoin.util.filesys']