Esempio n. 1
0
 def test_remove_dir(self, os_mock, shutil_mock):
     path = 'dir_for_removing'
     os_mock.path.isdir.return_value = True
     os_mock.path.islink.return_value = False
     utils.remove(path)
     shutil_mock.rmtree.assert_called_once_with(path)
     self.method_was_not_called(os_mock.remove)
Esempio n. 2
0
 def test_remove_dir(self, os_mock, shutil_mock):
     path = 'dir_for_removing'
     os_mock.path.isdir.return_value = True
     os_mock.path.islink.return_value = False
     utils.remove(path)
     shutil_mock.rmtree.assert_called_once_with(path)
     self.method_was_not_called(os_mock.remove)
Esempio n. 3
0
 def clean(self):
     utils.remove(self.build_dir)
     utils.create_dir(self.build_dir)
     utils.remove_by_mask(self.result_package_mask)
Esempio n. 4
0
 def clean(self):
     utils.remove(self.build_dir)
     utils.create_dir(self.build_dir)
     utils.remove_by_mask(self.result_package_mask)
Esempio n. 5
0
 def test_remove_file(self, os_mock, shutil_mock):
     path = 'file_for_removing'
     os_mock.path.isdir.return_value = False
     utils.remove(path)
     os_mock.remove.assert_called_once_with(path)
     self.method_was_not_called(shutil_mock.rmtree)
Esempio n. 6
0
 def test_remove_file(self, os_mock, shutil_mock):
     path = 'file_for_removing'
     os_mock.path.isdir.return_value = False
     utils.remove(path)
     os_mock.remove.assert_called_once_with(path)
     self.method_was_not_called(shutil_mock.rmtree)
Esempio n. 7
0
 def clean(self):
     utils.remove(self.build_dir)
     utils.create_dir(self.build_dir)