Skip to content

Commit b4cb352

Browse files
authored
fail test suite on unexpected passes (#5556)
1 parent 50608fb commit b4cb352

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ addopts =
1010
--ignore-glob=test/test_prototype_*.py
1111
testpaths =
1212
test
13+
xfail_strict = True

test/test_prototype_builtin_datasets.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -107,29 +107,15 @@ def test_transformable(self, test_home, dataset_mock, config):
107107

108108
next(iter(dataset.map(transforms.Identity())))
109109

110-
@parametrize_dataset_mocks(
111-
DATASET_MOCKS,
112-
marks={
113-
"cub200": pytest.mark.xfail(
114-
reason="See https://github.com/pytorch/vision/pull/5187#issuecomment-1015479165"
115-
)
116-
},
117-
)
110+
@parametrize_dataset_mocks(DATASET_MOCKS)
118111
def test_traversable(self, test_home, dataset_mock, config):
119112
dataset_mock.prepare(test_home, config)
120113

121114
dataset = datasets.load(dataset_mock.name, **config)
122115

123116
traverse(dataset)
124117

125-
@parametrize_dataset_mocks(
126-
DATASET_MOCKS,
127-
marks={
128-
"cub200": pytest.mark.xfail(
129-
reason="See https://github.com/pytorch/vision/pull/5187#issuecomment-1015479165"
130-
)
131-
},
132-
)
118+
@parametrize_dataset_mocks(DATASET_MOCKS)
133119
@pytest.mark.parametrize("annotation_dp_type", (Shuffler, ShardingFilter))
134120
def test_has_annotations(self, test_home, dataset_mock, config, annotation_dp_type):
135121
def scan(graph):

0 commit comments

Comments
 (0)