1
- from nose .tools import assert_true , assert_false , assert_equal , \
2
- assert_list_equal , raises
1
+ from nose .tools import assert_equal
3
2
from . import PREFIX , CONN_INFO
4
3
import numpy as np
5
4
import importlib
6
5
try :
7
6
dj = importlib .import_module ('datajoint-python.datajoint' , None )
8
- except :
7
+ except Exception as e :
9
8
import datajoint as dj
10
9
11
10
schema = dj .Schema (PREFIX + '_fetch_same' , connection = dj .conn (** CONN_INFO ))
@@ -22,13 +21,15 @@ class ProjData(dj.Manual):
22
21
blah : varchar(10)
23
22
"""
24
23
25
- ProjData ().insert ([
26
- {'id' : 0 , 'resp' : 20.33 , 'sim' : 45.324 , 'big' : 3 , 'blah' : 'yes' },
27
- {'id' : 1 , 'resp' : 94.3 , 'sim' : 34.23 ,
28
- 'big' : {'key1' : np .random .randn (20 , 10 )}, 'blah' : 'si' },
29
- {'id' : 2 , 'resp' : 1.90 , 'sim' : 10.23 ,
30
- 'big' : np .random .randn (4 , 2 ), 'blah' : 'sim' }
31
- ])
24
+
25
+ with dj .config (enable_python_native_blobs = True ):
26
+ ProjData ().insert ([
27
+ {'id' : 0 , 'resp' : 20.33 , 'sim' : 45.324 , 'big' : 3 , 'blah' : 'yes' },
28
+ {'id' : 1 , 'resp' : 94.3 , 'sim' : 34.23 ,
29
+ 'big' : {'key1' : np .random .randn (20 , 10 )}, 'blah' : 'si' },
30
+ {'id' : 2 , 'resp' : 1.90 , 'sim' : 10.23 ,
31
+ 'big' : np .random .randn (4 , 2 ), 'blah' : 'sim' }
32
+ ])
32
33
33
34
34
35
class TestFetchSame :
0 commit comments