"docs/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "98388670d293a590e69d9ff6b442169829f47cf3"
Unverified Commit a192c95e authored by Nicolas Hug's avatar Nicolas Hug Committed by GitHub
Browse files

Remove check_v2_dataset_warnings.py which is failing (#7280)

parent 4774fe3a
......@@ -55,9 +55,3 @@ jobs:
# Run Tests
python3 -m torch.utils.collect_env
python3 -m pytest --junitxml=test-results/junit.xml -v --durations 20
# Specific test for warnings on "from torchvision.datasets import wrap_dataset_for_transforms_v2"
# We keep them separate to avoid any side effects due to warnings / imports.
# TODO: Remove this and add proper tests (possibly using a sub-process solution as described
# in https://github.com/pytorch/vision/pull/7269).
python3 -m pytest -v test/check_v2_dataset_warnings.py
import pytest
def test_warns_if_imported_from_datasets(mocker):
mocker.patch("torchvision._WARN_ABOUT_BETA_TRANSFORMS", return_value=True)
import torchvision
with pytest.warns(UserWarning, match=torchvision._BETA_TRANSFORMS_WARNING):
from torchvision.datasets import wrap_dataset_for_transforms_v2
assert callable(wrap_dataset_for_transforms_v2)
@pytest.mark.filterwarnings("error")
def test_no_warns_if_imported_from_datasets():
from torchvision.datasets import wrap_dataset_for_transforms_v2
assert callable(wrap_dataset_for_transforms_v2)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment