+
+
+@pytest.mark.asyncio
+async def test_load_parallel_file(dsn, sql_preprocessor, tmp_path, temp_db_cursor):
+ (tmp_path / 'test.sql').write_text("""
+ CREATE TABLE foo (a TEXT);
+ CREATE TABLE foo2(a TEXT);""" +
+ "\n---\nCREATE TABLE bar (b INT);")
+
+ await sql_preprocessor.run_parallel_sql_file(dsn, 'test.sql', num_threads=4)
+
+ assert temp_db_cursor.table_exists('foo')
+ assert temp_db_cursor.table_exists('foo2')
+ assert temp_db_cursor.table_exists('bar')