-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
test_text_backend.py
67 lines (48 loc) · 1.41 KB
/
test_text_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
58
59
60
61
62
63
64
65
66
67
from pymc3.tests import backend_fixtures as bf
from pymc3.backends import ndarray, text
class TestText0dSampling(bf.SamplingTestCase):
backend = text.Text
name = 'text-db'
shape = ()
class TestText1dSampling(bf.SamplingTestCase):
backend = text.Text
name = 'text-db'
shape = 2
class TestText2dSampling(bf.SamplingTestCase):
backend = text.Text
name = 'text-db'
shape = (2, 3)
class TestText0dSelection(bf.SelectionTestCase):
backend = text.Text
name = 'text-db'
shape = ()
class TestText1dSelection(bf.SelectionTestCase):
backend = text.Text
name = 'text-db'
shape = 2
class TestText2dSelection(bf.SelectionTestCase):
backend = text.Text
name = 'text-db'
shape = (2, 3)
class TestTextDumpLoad(bf.DumpLoadTestCase):
backend = text.Text
load_func = staticmethod(text.load)
name = 'text-db'
shape = (2, 3)
class TestTextDumpFunction(bf.BackendEqualityTestCase):
backend0 = backend1 = ndarray.NDArray
name0 = None
name1 = 'text-db'
shape = (2, 3)
@classmethod
def setUpClass(cls):
super(TestTextDumpFunction, cls).setUpClass()
text.dump(cls.name1, cls.mtrace1)
with cls.model:
cls.mtrace1 = text.load(cls.name1)
class TestNDArrayTextEquality(bf.BackendEqualityTestCase):
backend0 = ndarray.NDArray
name0 = None
backend1 = text.Text
name1 = 'text-db'
shape = (2, 3)