Skip to content

Commit 454fcbd

Browse files
committed
add test for save_model_report
1 parent cee5001 commit 454fcbd

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

fooof/tests/objs/test_group.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
They serve rather as 'smoke tests', for if anything fails completely.
77
"""
88

9+
import os
10+
911
import numpy as np
1012
from numpy.testing import assert_equal
1113

@@ -17,7 +19,7 @@
1719

1820
pd = safe_import('pandas')
1921

20-
from fooof.tests.settings import TEST_DATA_PATH
22+
from fooof.tests.settings import TEST_DATA_PATH, TEST_REPORTS_PATH
2123
from fooof.tests.tutils import default_group_params, plot_test
2224

2325
from fooof.objs.group import *
@@ -212,6 +214,13 @@ def test_fg_print(tfg):
212214
tfg.print_results()
213215
assert True
214216

217+
def test_save_model_report(tfg):
218+
219+
file_name = 'test_group_model_report'
220+
tfg.save_model_report(0, file_name, TEST_REPORTS_PATH)
221+
222+
assert os.path.exists(os.path.join(TEST_REPORTS_PATH, file_name + '.pdf'))
223+
215224
def test_get_results(tfg):
216225
"""Check get results method."""
217226

0 commit comments

Comments
 (0)