Skip to content

Commit a71141f

Browse files
0.14.33
pytest cleanup
1 parent 83f3830 commit a71141f

7 files changed

Lines changed: 1 addition & 31 deletions

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
77

88
[project]
99
name = "spotpython"
10-
version = "0.14.32"
10+
version = "0.14.33"
1111
authors = [
1212
{ name="T. Bartz-Beielstein", email="tbb@bartzundbartz.de" }
1313
]

test/test_get_var_name.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pytest
21
from spotPython.hyperparameters.values import get_var_name
32

43

@@ -34,7 +33,3 @@ def test_get_var_name():
3433
}
3534
# fun_control has 5 keys (hyperparameters)
3635
assert len(get_var_name(fun_control)) == 5
37-
38-
39-
if __name__ == "__main__":
40-
pytest.main(["-v", __file__])

test/test_hyper_light_fun.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pytest
21
from spotPython.utils.init import fun_control_init
32
from spotPython.light.regression.netlightregression import NetLightRegression
43
from spotPython.hyperdict.light_hyper_dict import LightHyperDict
@@ -26,7 +25,3 @@ def test_hyper_light_fun():
2625
X = np.vstack((X, X))
2726
y = hyper_light.fun(X, fun_control)
2827
assert y.shape == (2,)
29-
30-
31-
if __name__ == "__main__":
32-
pytest.main(["-v", __file__])

test/test_optimizer_handler.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pytest
21
from torch.utils.data import DataLoader
32
from spotPython.data.diabetes import Diabetes
43
from spotPython.light.regression.netlightregression import NetLightRegression
@@ -61,7 +60,3 @@ def test_optimizer_handler_adadelta():
6160
# Adadelta uses a lr which is calculated as lr=lr_mult * 1.0, so this value
6261
# should be 1.0 * 0.1 = 0.1
6362
assert trainer.optimizers[0].param_groups[0]["lr"] == lr_mult * 1.0
64-
65-
66-
if __name__ == "__main__":
67-
pytest.main(["-v", __file__])

test/test_pkldataset.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pytest
21
import torch
32
from torch.utils.data import DataLoader
43
from spotPython.data.pkldataset import PKLDataset
@@ -28,7 +27,3 @@ def test_pkl_dataset():
2827
assert inputs.size(0) == batch_size
2928
assert targets.size(0) == batch_size
3029
break
31-
32-
33-
if __name__ == "__main__":
34-
pytest.main(["-v", __file__])

test/test_testmodel.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pytest
21
from spotPython.utils.init import fun_control_init
32
from spotPython.light.regression.netlightregression import NetLightRegression
43
from spotPython.hyperdict.light_hyper_dict import LightHyperDict
@@ -24,7 +23,3 @@ def test_testmodel():
2423
break
2524
# check if y is a float
2625
assert isinstance(y_test[0], float)
27-
28-
29-
if __name__ == "__main__":
30-
pytest.main(["-v", __file__])

test/test_trainmodel.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pytest
21
from spotPython.utils.init import fun_control_init
32
from spotPython.light.regression.netlightregression import NetLightRegression
43
from spotPython.hyperdict.light_hyper_dict import LightHyperDict
@@ -23,7 +22,3 @@ def test_trainmodel():
2322
break
2423
# check if y is a float
2524
assert isinstance(y_train, float)
26-
27-
28-
if __name__ == "__main__":
29-
pytest.main(["-v", __file__])

0 commit comments

Comments
 (0)