-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
test_sqlite_backend.py
57 lines (40 loc) · 1.16 KB
/
test_sqlite_backend.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import os
from pymc3.tests import backend_fixtures as bf
from pymc3.backends import ndarray, sqlite
import tempfile
DBNAME = os.path.join(tempfile.gettempdir(), 'test.db')
class TestSQlite0dSampling(bf.SamplingTestCase):
backend = sqlite.SQLite
name = DBNAME
shape = ()
class TestSQlite1dSampling(bf.SamplingTestCase):
backend = sqlite.SQLite
name = DBNAME
shape = 2
class TestSQlite2dSampling(bf.SamplingTestCase):
backend = sqlite.SQLite
name = DBNAME
shape = (2, 3)
class TestSQLite0dSelection(bf.SelectionTestCase):
backend = sqlite.SQLite
name = DBNAME
shape = ()
class TestSQLite1dSelection(bf.SelectionTestCase):
backend = sqlite.SQLite
name = DBNAME
shape = 2
class TestSQLite2dSelection(bf.SelectionTestCase):
backend = sqlite.SQLite
name = DBNAME
shape = (2, 3)
class TestSQLiteDumpLoad(bf.DumpLoadTestCase):
backend = sqlite.SQLite
load_func = staticmethod(sqlite.load)
name = DBNAME
shape = (2, 3)
class TestNDArraySqliteEquality(bf.BackendEqualityTestCase):
backend0 = ndarray.NDArray
name0 = None
backend1 = sqlite.SQLite
name1 = DBNAME
shape = (2, 3)