def test_successful_removal(self, mock_rmtree): # Setup test_dir = '/test/dir' # Test export_utils.cleanup_working_dir(test_dir) mock_rmtree.assert_called_once_with(test_dir)
def test_failed_removal(self, mock_rmtree): # Setup mock_rmtree.side_effect = OSError('boop') # Test try: export_utils.cleanup_working_dir('/somedir') except OSError: self.fail('cleanup_working_dir should not raise an exception when rmtree fails')