File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 1
1
import numpy .testing as npt
2
+ import os
2
3
from pymc3 .tests import backend_fixtures as bf
3
4
from pymc3 .backends import ndarray , sqlite
5
+ import tempfile
6
+
7
+ DBNAME = os .path .join (tempfile .gettempdir (), 'test.db' )
4
8
5
9
6
10
class TestSQlite0dSampling (bf .SamplingTestCase ):
7
11
backend = sqlite .SQLite
8
- name = '/tmp/test.db'
12
+ name = DBNAME
9
13
shape = ()
10
14
11
15
12
16
class TestSQlite1dSampling (bf .SamplingTestCase ):
13
17
backend = sqlite .SQLite
14
- name = '/tmp/test.db'
18
+ name = DBNAME
15
19
shape = 2
16
20
17
21
18
22
class TestSQlite2dSampling (bf .SamplingTestCase ):
19
23
backend = sqlite .SQLite
20
- name = '/tmp/test.db'
24
+ name = DBNAME
21
25
shape = (2 , 3 )
22
26
23
27
24
28
class TestSQLite0dSelection (bf .SelectionNoSliceTestCase ):
25
29
backend = sqlite .SQLite
26
- name = '/tmp/test.db'
30
+ name = DBNAME
27
31
shape = ()
28
32
29
33
30
34
class TestSQLite1dSelection (bf .SelectionNoSliceTestCase ):
31
35
backend = sqlite .SQLite
32
- name = '/tmp/test.db'
36
+ name = DBNAME
33
37
shape = 2
34
38
35
39
36
40
class TestSQLite2dSelection (bf .SelectionNoSliceTestCase ):
37
41
backend = sqlite .SQLite
38
- name = '/tmp/test.db'
42
+ name = DBNAME
39
43
shape = (2 , 3 )
40
44
41
45
42
46
class TestSQLiteDumpLoad (bf .DumpLoadTestCase ):
43
47
backend = sqlite .SQLite
44
48
load_func = staticmethod (sqlite .load )
45
- name = '/tmp/test.db'
49
+ name = DBNAME
46
50
shape = (2 , 3 )
47
51
48
52
49
53
class TestNDArraySqliteEquality (bf .BackendEqualityTestCase ):
50
54
backend0 = ndarray .NDArray
51
55
name0 = None
52
56
backend1 = sqlite .SQLite
53
- name1 = '/tmp/test.db'
57
+ name1 = DBNAME
54
58
shape = (2 , 3 )
55
59
56
60
You can’t perform that action at this time.
0 commit comments