Skip to content

Commit ff4af14

Browse files
committed
remove changes related to EXTRA_PATCHES which we don't need anymore
1 parent dd14728 commit ff4af14

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

test/datasets_utils.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ class DatasetTestCase(unittest.TestCase):
204204
``transforms``, or ``download``.
205205
- REQUIRED_PACKAGES (Iterable[str]): Additional dependencies to use the dataset. If these packages are not
206206
available, the tests are skipped.
207-
- EXTRA_PATCHES(set): Additional patches to add for each test, to e.g. mock a specific function
208207
209208
Additionally, you need to overwrite the ``inject_fake_data()`` method that provides the data that the tests rely on.
210209
The fake data should resemble the original data as close as necessary, while containing only few examples. During
@@ -256,8 +255,6 @@ def test_baz(self):
256255
ADDITIONAL_CONFIGS = None
257256
REQUIRED_PACKAGES = None
258257

259-
EXTRA_PATCHES = None
260-
261258
# These keyword arguments are checked by test_transforms in case they are available in DATASET_CLASS.
262259
_TRANSFORM_KWARGS = {
263260
"transform",
@@ -383,17 +380,14 @@ def create_dataset(
383380
if patch_checks:
384381
patchers.update(self._patch_checks())
385382

386-
if self.EXTRA_PATCHES is not None:
387-
patchers.update(self.EXTRA_PATCHES)
388-
389383
with get_tmp_dir() as tmpdir:
390384
args = self.dataset_args(tmpdir, complete_config)
391385
info = self._inject_fake_data(tmpdir, complete_config) if inject_fake_data else None
392386

393387
with self._maybe_apply_patches(patchers), disable_console_output():
394388
dataset = self.DATASET_CLASS(*args, **complete_config, **special_kwargs)
395389

396-
yield dataset, info
390+
yield dataset, info
397391

398392
@classmethod
399393
def setUpClass(cls):

0 commit comments

Comments
 (0)