def test_thru(self): file = self._mock_test_file() storage = self._mock_storage() storage.add_part(file, b'abcdefghijklmnopqrstuvwxyz') assert b'abcdefghijklmnopqrstuvwxyz' == storage.get_part(file, 0) storage.truncate(file, 16) assert b'abcdefghijklmnop' == storage.get_part(file, 0) storage.remove(file) assert not Files.is_file(file)
def tearDown(self): if Files.is_file(self._mock_test_file()): self._mock_storage().remove(self._mock_test_file()) super().tearDown()
def tearDown(self): if Files.is_file(self._mock_test_file()): Files.unlink(self._mock_test_file()) if Dirs.is_dir(self._mock_test_file()): Dirs.rmdir(self._mock_test_file()) super().tearDown()
def tearDown(self): if Files.is_file(self._mock_test_file()): lib = Volume(Translations()) lib.remove(self._mock_test_file()) super().tearDown()