Skip to content

Commit 25ff4b5

Browse files
committed
TST update tests to check default n_jobs
1 parent 0492553 commit 25ff4b5

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

imblearn/combine/tests/test_smote_enn.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ def test_validate_estimator_default():
147147

148148

149149
def test_parallelisation():
150-
# Check if default job count is 1
150+
# Check if default job count is none
151151
smt = SMOTEENN(random_state=RND_SEED)
152152
smt._validate_estimator()
153-
assert smt.n_jobs == 1
154-
assert smt.smote_.n_jobs == 1
155-
assert smt.enn_.n_jobs == 1
153+
assert smt.n_jobs is None
154+
assert smt.smote_.n_jobs is None
155+
assert smt.enn_.n_jobs is None
156156

157157
# Check if job count is set
158158
smt = SMOTEENN(random_state=RND_SEED, n_jobs=8)

imblearn/combine/tests/test_smote_tomek.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@ def test_validate_estimator_default():
157157

158158

159159
def test_parallelisation():
160-
# Check if default job count is 1
160+
# Check if default job count is None
161161
smt = SMOTETomek(random_state=RND_SEED)
162162
smt._validate_estimator()
163-
assert smt.n_jobs == 1
164-
assert smt.smote_.n_jobs == 1
165-
assert smt.tomek_.n_jobs == 1
163+
assert smt.n_jobs is None
164+
assert smt.smote_.n_jobs is None
165+
assert smt.tomek_.n_jobs is None
166166

167167
# Check if job count is set
168168
smt = SMOTETomek(random_state=RND_SEED, n_jobs=8)

imblearn/under_sampling/_prototype_selection/tests/test_condensed_nearest_neighbour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_cnn_init():
4343
cnn = CondensedNearestNeighbour(random_state=RND_SEED)
4444

4545
assert cnn.n_seeds_S == 1
46-
assert cnn.n_jobs == 1
46+
assert cnn.n_jobs is None
4747

4848

4949
def test_cnn_fit_resample():

imblearn/under_sampling/_prototype_selection/tests/test_edited_nearest_neighbours.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_enn_init():
4444

4545
assert enn.n_neighbors == 3
4646
assert enn.kind_sel == "all"
47-
assert enn.n_jobs == 1
47+
assert enn.n_jobs is None
4848

4949

5050
def test_enn_fit_resample():

imblearn/under_sampling/_prototype_selection/tests/test_one_sided_selection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_oss_init():
3838
oss = OneSidedSelection(random_state=RND_SEED)
3939

4040
assert oss.n_seeds_S == 1
41-
assert oss.n_jobs == 1
41+
assert oss.n_jobs is None
4242
assert oss.random_state == RND_SEED
4343

4444

imblearn/under_sampling/_prototype_selection/tests/test_repeated_edited_nearest_neighbours.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def test_renn_init():
106106

107107
assert renn.n_neighbors == 3
108108
assert renn.kind_sel == "all"
109-
assert renn.n_jobs == 1
109+
assert renn.n_jobs is None
110110

111111

112112
def test_renn_iter_wrong():

imblearn/under_sampling/_prototype_selection/tests/test_tomek_links.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
def test_tl_init():
3939
tl = TomekLinks()
40-
assert tl.n_jobs == 1
40+
assert tl.n_jobs is None
4141

4242

4343
def test_tl_fit_resample():

0 commit comments

Comments
 (0)