Skip to content

Commit

Permalink
Enable commented test for rmdir
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuupertunut committed Dec 22, 2024
1 parent d4f113d commit 5dd6d28
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,16 +417,23 @@ def test_posix_operations(self):
def test_rmdir(self):
with self.assertRaises(OSError):
os.rmdir('union/ro1_dir')

os.remove('union/rw1_dir/rw1_file')
os.rmdir('union/rw1_dir')
self.assertFalse(os.path.isdir('union/rw1_dir'))
self.assertFalse(os.path.isdir('rw1/rw1_dir'))
self.assertFalse(os.path.exists('union/rw1_dir'))
self.assertFalse(os.path.exists('rw1/rw1_dir'))

os.rmdir('union/common_empty_dir')
# TODO: decide what the correct behaviour should be
#self.assertFalse(os.path.isdir('union/common_empty_dir'))
#os.remove('union/common_dir/common_file')
#os.rmdir('union/common_dir')
#self.assertFalse(os.path.isdir('union/common_dir'))
self.assertFalse(os.path.exists('union/common_empty_dir'))

os.remove('union/common_dir/common_file')
os.remove('union/common_dir/ro_common_file')
os.remove('union/common_dir/rw_common_file')
os.remove('union/common_dir/ro2_file')
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'))


class UnionFS_RO_RW_TestCase(Common, unittest.TestCase):
Expand Down

0 comments on commit 5dd6d28

Please sign in to comment.