1- from nose .tools import assert_true , assert_false , assert_equal , \
2- assert_list_equal , raises
1+ from nose .tools import assert_equal
32from . import PREFIX , CONN_INFO
43import numpy as np
5- import importlib
6- try :
7- dj = importlib .import_module ('datajoint-python.datajoint' , None )
8- except :
9- import datajoint as dj
4+ import datajoint as dj
105
116schema = dj .Schema (PREFIX + '_fetch_same' , connection = dj .conn (** CONN_INFO ))
127
@@ -22,13 +17,15 @@ class ProjData(dj.Manual):
2217 blah : varchar(10)
2318 """
2419
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- ])
20+
21+ with dj .config (enable_python_native_blobs = True ):
22+ ProjData ().insert ([
23+ {'id' : 0 , 'resp' : 20.33 , 'sim' : 45.324 , 'big' : 3 , 'blah' : 'yes' },
24+ {'id' : 1 , 'resp' : 94.3 , 'sim' : 34.23 ,
25+ 'big' : {'key1' : np .random .randn (20 , 10 )}, 'blah' : 'si' },
26+ {'id' : 2 , 'resp' : 1.90 , 'sim' : 10.23 ,
27+ 'big' : np .random .randn (4 , 2 ), 'blah' : 'sim' }
28+ ])
3229
3330
3431class TestFetchSame :
0 commit comments