@@ -32,7 +32,6 @@ def subject():
3232
3333
3434class TestFetch :
35- @pytest .mark .skip (reason = 'temp' )
3635 def test_getattribute (self , schema_any , subject ):
3736 """Testing Fetch.__call__ with attributes"""
3837 list1 = sorted (
@@ -56,15 +55,13 @@ def test_getattribute(self, schema_any, subject):
5655 for l1 , l2 in zip (list1 , list2 ):
5756 assert l1 == l2 , "Primary key is not returned correctly"
5857
59- @pytest .mark .skip (reason = 'temp' )
6058 def test_getattribute_for_fetch1 (self , schema_any , subject ):
6159 """Testing Fetch1.__call__ with attributes"""
6260 assert (subject & "subject_id=10" ).fetch1 ("subject_id" ) == 10
6361 assert (
6462 (subject & "subject_id=10" ).fetch1 ("subject_id" , "species" ) ==
6563 (10 , "monkey" ))
6664
67- @pytest .mark .skip (reason = 'temp' )
6865 def test_order_by (self , schema_any , lang , languages ):
6966 """Tests order_by sorting order"""
7067 for ord_name , ord_lang in itertools .product (* 2 * [["ASC" , "DESC" ]]):
@@ -74,7 +71,6 @@ def test_order_by(self, schema_any, lang, languages):
7471 for c , l in zip (cur , languages ):
7572 assert np .all (cc == ll for cc , ll in zip (c , l )), "Sorting order is different"
7673
77- @pytest .mark .skip (reason = 'temp' )
7874 def test_order_by_default (self , schema_any , lang , languages ):
7975 """Tests order_by sorting order with defaults"""
8076 cur = lang .fetch (order_by = ("language" , "name DESC" ))
@@ -83,14 +79,12 @@ def test_order_by_default(self, schema_any, lang, languages):
8379 for c , l in zip (cur , languages ):
8480 assert np .all ([cc == ll for cc , ll in zip (c , l )]), "Sorting order is different"
8581
86- @pytest .mark .skip (reason = 'temp' )
8782 def test_limit (self , schema_any , lang ):
8883 """Test the limit kwarg"""
8984 limit = 4
9085 cur = lang .fetch (limit = limit )
9186 assert len (cur ) == limit , "Length is not correct"
9287
93- @pytest .mark .skip (reason = 'temp' )
9488 def test_order_by_limit (self , schema_any , lang , languages ):
9589 """Test the combination of order by and limit kwargs"""
9690 cur = lang .fetch (limit = 4 , order_by = ["language" , "name DESC" ])
@@ -100,7 +94,6 @@ def test_order_by_limit(self, schema_any, lang, languages):
10094 for c , l in list (zip (cur , languages ))[:4 ]:
10195 assert np .all ([cc == ll for cc , ll in zip (c , l )]), "Sorting order is different"
10296
103- @pytest .mark .skip (reason = 'temp' )
10497 def test_head_tail (self , schema_any ):
10598 query = schema .User * schema .Language
10699 n = 5
@@ -118,7 +111,6 @@ def test_head_tail(self, schema_any):
118111 assert len (frame ) == n
119112 assert query .primary_key == frame .index .names
120113
121- @pytest .mark .skip (reason = 'temp' )
122114 def test_limit_offset (self , schema_any , lang , languages ):
123115 """Test the limit and offset kwargs together"""
124116 cur = lang .fetch (offset = 2 , limit = 4 , order_by = ["language" , "name DESC" ])
@@ -128,7 +120,6 @@ def test_limit_offset(self, schema_any, lang, languages):
128120 for c , l in list (zip (cur , languages [2 :6 ])):
129121 assert np .all ([cc == ll for cc , ll in zip (c , l )]), "Sorting order is different"
130122
131- @pytest .mark .skip (reason = 'temp' )
132123 def test_iter (self , schema_any , lang , languages ):
133124 """Test iterator"""
134125 cur = lang .fetch (order_by = ["language" , "name DESC" ])
@@ -141,7 +132,6 @@ def test_iter(self, schema_any, lang, languages):
141132 for row , (tname , tlang ) in list (zip (cur , languages )):
142133 assert row ["name" ] == tname and row ["language" ] == tlang , "Values are not the same"
143134
144- @pytest .mark .skip (reason = 'temp' )
145135 def test_keys (self , schema_any , lang , languages ):
146136 """test key fetch"""
147137 languages .sort (key = itemgetter (0 ), reverse = True )
@@ -154,7 +144,6 @@ def test_keys(self, schema_any, lang, languages):
154144 for c , c2 in zip (zip (* cur ), cur2 ):
155145 assert c == tuple (c2 .values ()), "Values are not the same"
156146
157- @pytest .mark .skip (reason = 'temp' )
158147 def test_attributes_as_dict (self , schema_any , subject ):
159148 """
160149 Issue #595
@@ -164,7 +153,6 @@ def test_attributes_as_dict(self, schema_any, subject):
164153 assert bool (result ) and len (result ) == len (subject )
165154 assert set (result [0 ]) == set (attrs )
166155
167- @pytest .mark .skip (reason = 'temp' )
168156 def test_fetch1_step1 (self , schema_any , lang , languages ):
169157 assert lang .contents == languages == [
170158 ("Fabian" , "English" ),
@@ -180,12 +168,10 @@ def test_fetch1_step1(self, schema_any, lang, languages):
180168 for k , (ke , c ) in zip (true , dat .items ()):
181169 assert k == c == (lang & key ).fetch1 (ke ), "Values are not the same"
182170
183- @pytest .mark .skip (reason = 'temp' )
184171 def test_misspelled_attribute (self , schema_any ):
185172 with pytest .raises (dj .DataJointError ):
186173 f = (schema .Language & 'lang = "ENGLISH"' ).fetch ()
187174
188- @pytest .mark .skip (reason = 'temp' )
189175 def test_repr (self , schema_any , subject ):
190176 """Test string representation of fetch, returning table preview"""
191177 repr = subject .fetch .__repr__ ()
@@ -194,7 +180,6 @@ def test_repr(self, schema_any, subject):
194180 # 3 lines are used for headers (2) and summary statement (1)
195181 assert n - 3 <= limit
196182
197- @pytest .mark .skip (reason = 'temp' )
198183 def test_fetch_none (self , schema_any , lang ):
199184 """Test preparing attributes for getitem"""
200185 with pytest .raises (dj .DataJointError ):
@@ -238,18 +223,15 @@ def test_limit_warning(self, schema_any, lang):
238223 logger .removeHandler (handler )
239224 assert "[WARNING]: Offset set, but no limit." in log_contents
240225
241- @pytest .mark .skip (reason = 'temp' )
242226 def test_len (self , schema_any , lang ):
243227 """Tests __len__"""
244228 assert len (lang .fetch ()) == len (lang ), "__len__ is not behaving properly"
245229
246- @pytest .mark .skip (reason = 'temp' )
247230 def test_fetch1_step2 (self , schema_any , lang ):
248231 """Tests whether fetch1 raises error"""
249232 with pytest .raises (dj .DataJointError ):
250233 lang .fetch1 ()
251234
252- @pytest .mark .skip (reason = 'temp' )
253235 def test_fetch1_step3 (self , schema_any , lang ):
254236 """Tests whether fetch1 raises error"""
255237 with pytest .raises (dj .DataJointError ):
0 commit comments