示例#1
0
 def test_empty_nested_directory(self):
     dirname = os.path.join(self.dir_root, 'foo')
     os.makedirs(dirname)
     self.assertFalse(validate_directory(self.dir_root))
示例#2
0
 def test_nonexistent_directory(self):
     dir_not_exist = os.path.join(self.dir_root, 'does_not_exist')
     self.assertFalse(validate_directory(dir_not_exist))
示例#3
0
 def test_nonprovided_directory(self):
     self.assertFalse(validate_directory(''))
示例#4
0
 def test_nested_file(self):
     self.file_creator.create_file('mydir/bar', '')
     self.assertTrue(validate_directory(self.dir_root))
示例#5
0
 def test_empty_directory(self):
     self.assertFalse(validate_directory(self.dir_root))
示例#6
0
 def test_directory_contains_single_file(self):
     self.file_creator.create_file('foo', '')
     self.assertTrue(validate_directory(self.dir_root))
示例#7
0
 def test_directory_contains_file_and_empty_directory(self):
     dirname = os.path.join(self.dir_root, 'foo')
     os.makedirs(dirname)
     self.file_creator.create_file('bar', '')
     self.assertTrue(validate_directory(self.dir_root))
示例#8
0
 def test_nonprovided_directory(self):
     self.assertFalse(validate_directory(""))
示例#9
0
 def test_empty_nested_directory(self):
     dirname = os.path.join(self.dir_root, "foo")
     os.makedirs(dirname)
     self.assertFalse(validate_directory(self.dir_root))
示例#10
0
 def test_nonexistent_directory(self):
     dir_not_exist = os.path.join(self.dir_root, "does_not_exist")
     self.assertFalse(validate_directory(dir_not_exist))
示例#11
0
 def test_empty_directory(self):
     self.assertFalse(validate_directory(self.dir_root))
示例#12
0
 def test_nested_file(self):
     self.file_creator.create_file("mydir/bar", "")
     self.assertTrue(validate_directory(self.dir_root))
示例#13
0
 def test_directory_contains_file_and_empty_directory(self):
     dirname = os.path.join(self.dir_root, "foo")
     os.makedirs(dirname)
     self.file_creator.create_file("bar", "")
     self.assertTrue(validate_directory(self.dir_root))
示例#14
0
 def test_directory_contains_single_file(self):
     self.file_creator.create_file("foo", "")
     self.assertTrue(validate_directory(self.dir_root))