@@ -128,10 +128,10 @@ def test_wrong_insert_type(user):
128
128
user .insert1 (3 )
129
129
130
130
131
- def test_insert_select (subject , test2 ):
131
+ def test_insert_select (subject , test , test2 ):
132
132
test2 .delete ()
133
- test2 .insert (schema . TTest )
134
- assert len (test2 ) == len (schema . TTest () )
133
+ test2 .insert (test )
134
+ assert len (test2 ) == len (test )
135
135
136
136
original_length = len (subject )
137
137
elements = subject .proj (..., s = "subject_id" )
@@ -146,27 +146,27 @@ def test_insert_select(subject, test2):
146
146
assert len (subject ) == 2 * original_length
147
147
148
148
149
- def test_insert_pandas_roundtrip (test2 ):
149
+ def test_insert_pandas_roundtrip (test , test2 ):
150
150
"""ensure fetched frames can be inserted"""
151
151
test2 .delete ()
152
- n = len (schema . TTest () )
152
+ n = len (test )
153
153
assert n > 0
154
- df = schema . TTest .fetch (format = "frame" )
154
+ df = test .fetch (format = "frame" )
155
155
assert isinstance (df , pandas .DataFrame )
156
156
assert len (df ) == n
157
157
test2 .insert (df )
158
158
assert len (test2 ) == n
159
159
160
160
161
- def test_insert_pandas_userframe (test2 ):
161
+ def test_insert_pandas_userframe (test , test2 ):
162
162
"""
163
163
ensure simple user-created frames (1 field, non-custom index)
164
164
can be inserted without extra index adjustment
165
165
"""
166
166
test2 .delete ()
167
- n = len (schema . TTest () )
167
+ n = len (test )
168
168
assert n > 0
169
- df = pandas .DataFrame (schema . TTest .fetch ())
169
+ df = pandas .DataFrame (test .fetch ())
170
170
assert isinstance (df , pandas .DataFrame )
171
171
assert len (df ) == n
172
172
test2 .insert (df )
0 commit comments