Skip to content

Commit d0ba0d7

Browse files
committed
Add pytest parametrize decorator to test_compatibility for automated testing
1 parent 8c6451d commit d0ba0d7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

methods/catalog/genre/reproduce.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
import argparse
1010
import os
1111
import pickle
12-
1312
import pandas as pd
1413
import torch
1514
from sklearn.neighbors import LocalOutlierFactor
15+
import pytest
1616

1717
try:
1818
from huggingface_hub import hf_hub_download
@@ -262,7 +262,12 @@ def reproduce_results():
262262
except AssertionError:
263263
print(f"FAIL Score = {score:.4f} outside expected range {EXPECTED_SCORE}")
264264

265-
265+
@pytest.mark.parametrize(
266+
"dataset_name, model_type, backend",
267+
[
268+
("genre_adult", "mlp", "pytorch"),
269+
],
270+
)
266271
def test_compatibility(dataset_name, model_type, backend):
267272
"""Test GenRe compatibility with repo's DataCatalog and ModelCatalog"""
268273
dataset = DataCatalog(dataset_name, model_type=model_type, train_split=0.8)

0 commit comments

Comments
 (0)