mirror of
https://github.com/Doctorado-ML/bayesclass.git
synced 2025-08-20 18:15:57 +00:00
Add some tests and remove .coveragerc
This commit is contained in:
BIN
bayesclass/tests/baseline_images/test_AODE/line_dashes_AODE.png
Normal file
BIN
bayesclass/tests/baseline_images/test_AODE/line_dashes_AODE.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 55 KiB |
Binary file not shown.
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
@@ -2,6 +2,8 @@ import pytest
|
||||
import numpy as np
|
||||
from sklearn.datasets import load_iris
|
||||
from sklearn.preprocessing import KBinsDiscretizer
|
||||
from matplotlib.testing.decorators import image_comparison
|
||||
from matplotlib.testing.conftest import mpl_test_settings
|
||||
|
||||
|
||||
from bayesclass.bayesclass import AODE
|
||||
@@ -37,6 +39,17 @@ def test_AODE_default_hyperparameters(data, clf):
|
||||
]
|
||||
|
||||
|
||||
@image_comparison(
|
||||
baseline_images=["line_dashes_AODE"], remove_text=True, extensions=["png"]
|
||||
)
|
||||
def test_AODE_plot(data, clf):
|
||||
# mpl_test_settings will automatically clean these internal side effects
|
||||
mpl_test_settings
|
||||
dataset = load_iris(as_frame=True)
|
||||
clf.fit(*data, features=dataset["feature_names"])
|
||||
clf.plot("AODE Iris")
|
||||
|
||||
|
||||
def test_AODE_version(clf):
|
||||
"""Check AODE version."""
|
||||
assert __version__ == clf.version()
|
||||
|
@@ -1,7 +0,0 @@
|
||||
import doctest
|
||||
import bayesclass
|
||||
|
||||
|
||||
def load_tests(loader, tests, ignore):
|
||||
tests.addTests(doctest.DocTestSuite(bayesclass))
|
||||
return tests
|
Reference in New Issue
Block a user