Skip to content
Snippets Groups Projects
Commit 90d7c1ef authored by Mateusz Klimaszewski's avatar Mateusz Klimaszewski
Browse files

Remove unused patching in test.

parent 43a61822
Branches
No related tags found
1 merge request!4Documentation
This commit is part of merge request !4. Comments created here will be created in the context of that merge request.
import os import os
import pathlib import pathlib
import shutil
import unittest import unittest
from unittest import mock
import combo.data as data import combo.data as data
import combo.predict as predict import combo.predict as predict
...@@ -14,16 +12,6 @@ class PredictionTest(unittest.TestCase): ...@@ -14,16 +12,6 @@ class PredictionTest(unittest.TestCase):
TESTS_ROOT = PROJECT_ROOT / "tests" TESTS_ROOT = PROJECT_ROOT / "tests"
FIXTURES_ROOT = TESTS_ROOT / "fixtures" FIXTURES_ROOT = TESTS_ROOT / "fixtures"
def setUp(self) -> None:
def _cleanup_archive_dir_without_logging(path: str):
if os.path.exists(path):
shutil.rmtree(path)
self.patcher = mock.patch(
"allennlp.models.archival._cleanup_archive_dir", _cleanup_archive_dir_without_logging
)
self.mock_cleanup_archive_dir = self.patcher.start()
def test_prediction_are_equal_given_the_same_input_in_different_form(self): def test_prediction_are_equal_given_the_same_input_in_different_form(self):
# given # given
raw_sentence = "Test." raw_sentence = "Test."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment