File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -298,12 +298,10 @@ def exists(self):
298298 """
299299 if self .database is None :
300300 raise DataJointError ("Schema must be activated first." )
301- return self .database is not None and (
302- self .connection .query (
303- "SELECT schema_name "
304- "FROM information_schema.schemata "
305- "WHERE schema_name = '{database}'" .format (
306- database = self .database )).rowcount > 0 )
301+ return bool (self .connection .query (
302+ "SELECT schema_name "
303+ "FROM information_schema.schemata "
304+ "WHERE schema_name = '{database}'" .format (database = self .database )).rowcount )
307305
308306 @property
309307 def jobs (self ):
Original file line number Diff line number Diff line change @@ -241,5 +241,9 @@ def test_fetch_format(self):
241241 list1 = sorted (key , key = itemgetter ('subject_id' ))
242242 for l1 , l2 in zip (list1 , list2 ):
243243 assert_dict_equal (l1 , l2 , 'Primary key is not returned correctly' )
244+
245+ # test pandas with fetch1
246+ k = (self .subject & 'subject_id=10' ).fetch1 ('KEY' )
247+
244248 # revert configuration of fetch format
245249 dj .config ['fetch_format' ] = 'array'
You can’t perform that action at this time.
0 commit comments