Skip to content

Instantly share code, notes, and snippets.

@mmulich
Created September 4, 2015 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmulich/6286546d7e12f77eabfc to your computer and use it in GitHub Desktop.
Save mmulich/6286546d7e12f77eabfc to your computer and use it in GitHub Desktop.
diff --git a/tests/common/db/test_util.py b/tests/common/db/test_util.py
index 73bc090..76152de 100644
--- a/tests/common/db/test_util.py
+++ b/tests/common/db/test_util.py
@@ -3,6 +3,7 @@
:copyright: (c) 2015 Rice University.
:author: pumazi.
"""
+import pytest
import sqlalchemy as db
from biglearn.common.db.util import (
@@ -14,6 +15,22 @@ from biglearn.common.db.util import (
make_table_with_created,
)
+from .helpers import (
+ dummy_tbl_name,
+ dummy_col_name,
+ dummy_col,
+ t,
+ uri,
+)
+
+
+@pytest.yield_fixture
+def conn():
+ sqlalchemy_uri = uri()
+ from biglearn.common.db.connect import Executor
+ with Executor(sqlalchemy_uri) as conn:
+ yield conn
+
metadata = db.MetaData()
@@ -39,3 +56,8 @@ def test_make_table_with_created():
# since the table already exists, the additional_column shouldn't
# be in the definition.
assert created_t == adden_t
+
+
+def test_batch_insert(conn, t):
+ import pdb; pdb.set_trace()
+ batch_insert(conn, lst, batch_size, transformer, table)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment