diff --git a/test_all.py b/test_all.py index e955078..689f878 100755 --- a/test_all.py +++ b/test_all.py @@ -309,21 +309,21 @@ def test_rename_common_dir(self): os.rename('union/common_dir', 'union/common_dir_renamed') - self.assertFalse(os.path.exists('union/common_dir')) + self.assertFalse(os.path.isdir('union/common_dir')) self.assertTrue(os.path.isdir('union/common_dir_renamed')) self.assertEqual(set(os.listdir('union/common_dir_renamed')), set(common_dir_contents)) self.assertEqual(read_from_file('union/common_dir_renamed/ro_common_file'), 'ro1') self.assertEqual(read_from_file('union/common_dir_renamed/common_file'), 'rw1') self.assertTrue(os.path.isdir('ro2/common_dir')) - self.assertFalse(os.path.exists('ro2/common_dir_renamed')) + self.assertFalse(os.path.isdir('ro2/common_dir_renamed')) self.assertEqual(set(os.listdir('ro2/common_dir')), set(['ro2_file', 'ro_common_file', 'common_file'])) self.assertTrue(os.path.isdir('ro1/common_dir')) - self.assertFalse(os.path.exists('ro1/common_dir_renamed')) + self.assertFalse(os.path.isdir('ro1/common_dir_renamed')) self.assertEqual(set(os.listdir('ro1/common_dir')), set(['ro1_file', 'ro_common_file', 'common_file'])) - self.assertFalse(os.path.exists('rw1/common_dir')) + self.assertFalse(os.path.isdir('rw1/common_dir')) self.assertTrue(os.path.isdir('rw1/common_dir_renamed')) self.assertEqual(set(os.listdir('rw1/common_dir_renamed')), set(common_dir_contents)) self.assertEqual(read_from_file('rw1/common_dir_renamed/ro_common_file'), 'ro1') @@ -354,7 +354,7 @@ def test_rename_file_masking_directory(self): os.rename('union/common_empty_dir', 'union/common_empty_dir_renamed') self.assertEqual(read_from_file('union/common_empty_dir_renamed'), 'this is a file') - self.assertFalse(os.path.exists('union/common_empty_dir')) + self.assertFalse(os.path.isdir('union/common_empty_dir')) def test_rename_onto_lower(self): os.rename('union/rw1_file', 'union/ro1_file') @@ -420,11 +420,11 @@ def test_rmdir(self): os.remove('union/rw1_dir/rw1_file') os.rmdir('union/rw1_dir') - self.assertFalse(os.path.exists('union/rw1_dir')) - self.assertFalse(os.path.exists('rw1/rw1_dir')) + self.assertFalse(os.path.isdir('union/rw1_dir')) + self.assertFalse(os.path.isdir('rw1/rw1_dir')) os.rmdir('union/common_empty_dir') - self.assertFalse(os.path.exists('union/common_empty_dir')) + self.assertFalse(os.path.isdir('union/common_empty_dir')) os.remove('union/common_dir/common_file') os.remove('union/common_dir/ro_common_file') @@ -433,7 +433,7 @@ def test_rmdir(self): os.remove('union/common_dir/ro1_file') os.remove('union/common_dir/rw1_file') os.rmdir('union/common_dir') - self.assertFalse(os.path.exists('union/common_dir')) + self.assertFalse(os.path.isdir('union/common_dir')) class UnionFS_RO_RW_TestCase(Common, unittest.TestCase):