Skip to content

Commit 41a726d

Browse files
committed
Add test for fixture
1 parent c83dd0c commit 41a726d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

imblearn/utils/estimator_checks.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,19 @@ def sample_dataset_generator_fixture():
7575
return sample_dataset_generator()
7676

7777

78+
def test_dataset_generator():
79+
X_generated, y_generated = sample_dataset_generator()
80+
X, y = make_classification(
81+
n_samples=1000,
82+
n_classes=3,
83+
n_informative=4,
84+
weights=[0.2, 0.3, 0.5],
85+
random_state=0,
86+
)
87+
assert X_generated.all() == X.all()
88+
assert y_generated.all() == y.all()
89+
90+
7891
def _set_checking_parameters(estimator):
7992
params = estimator.get_params()
8093
name = estimator.__class__.__name__

0 commit comments

Comments
 (0)