|
4 | 4 | import unittest |
5 | 5 | from math import fabs |
6 | 6 |
|
7 | | -import pytest |
8 | 7 | from testfixtures import LogCapture |
9 | 8 |
|
10 | 9 | from cmdstanpy.cmdstan_args import CmdStanArgs, VariationalArgs |
|
16 | 15 |
|
17 | 16 |
|
18 | 17 | class CmdStanVBTest(unittest.TestCase): |
19 | | - |
20 | | - # pylint: disable=no-self-use |
21 | | - @pytest.fixture(scope='class', autouse=True) |
22 | | - def do_clean_up(self): |
23 | | - for root, _, files in os.walk( |
24 | | - os.path.join(DATAFILES_PATH, 'variational') |
25 | | - ): |
26 | | - for filename in files: |
27 | | - _, ext = os.path.splitext(filename) |
28 | | - if ( |
29 | | - ext.lower() in ('.o', '.d', '.hpp', '.exe', '') |
30 | | - and filename != ".gitignore" |
31 | | - and filename != "return_one.hpp" |
32 | | - ): |
33 | | - filepath = os.path.join(root, filename) |
34 | | - os.remove(filepath) |
35 | | - |
36 | 18 | def test_instantiate(self): |
37 | 19 | stan = os.path.join( |
38 | 20 | DATAFILES_PATH, 'variational', 'eta_should_be_big.stan' |
@@ -155,23 +137,6 @@ def test_variables_3d(self): |
155 | 137 |
|
156 | 138 |
|
157 | 139 | class VariationalTest(unittest.TestCase): |
158 | | - |
159 | | - # pylint: disable=no-self-use |
160 | | - @pytest.fixture(scope='class', autouse=True) |
161 | | - def do_clean_up(self): |
162 | | - for root, _, files in os.walk( |
163 | | - os.path.join(DATAFILES_PATH, 'variational') |
164 | | - ): |
165 | | - for filename in files: |
166 | | - _, ext = os.path.splitext(filename) |
167 | | - if ( |
168 | | - ext.lower() in ('.o', '.d', '.hpp', '.exe', '') |
169 | | - and filename != ".gitignore" |
170 | | - and filename != "return_one.hpp" |
171 | | - ): |
172 | | - filepath = os.path.join(root, filename) |
173 | | - os.remove(filepath) |
174 | | - |
175 | 140 | def test_variational_good(self): |
176 | 141 | stan = os.path.join( |
177 | 142 | DATAFILES_PATH, 'variational', 'eta_should_be_big.stan' |
|
0 commit comments