I moved the package loading code from pyodide.js into a separate file without other changes.
More specifically I changed `let loadScript;` ==> `export let loadScript;` and I added `import { Module } from "./module";` to the top of the file. Also everything got de-indented.
Split off load-pyodide.js from pyodide.js. I moved the package loading code from pyodide.js into a separate file without other changes.
More specifically I changed `let loadScript;` ==> `export let loadScript;` and I added `import { Module } from "./module";` to the top of the file. Also everything got de-indented.
from pyodide_build.testing import run_in_pyodide


@run_in_pyodide
def test_sqlite3():
    import sqlite3

    with sqlite3.connect(":memory:") as conn:
        c = conn.cursor()
        c.execute(
            """
            CREATE TABLE people (
                first_name VARCHAR,
                last_name VARCHAR
            )
        """
        )
        c.execute("INSERT INTO people VALUES ('John', 'Doe')")
        c.execute("INSERT INTO people VALUES ('Jane', 'Smith')")
        c.execute("INSERT INTO people VALUES ('Michael', 'Jordan')")
        c.execute("SELECT * FROM people")

    content = c.fetchall()
    assert len(content) == 3
    assert content[0][0] == "John"
    assert content[1][0] == "Jane"
    assert content[2][0] == "Michael"

from pyodide_build.testing import run_in_pyodide


@run_in_pyodide
def test_sqlite3():
    import sqlite3

    with sqlite3.connect(":memory:") as conn:
        c = conn.cursor()
        c.execute(
            """
            CREATE TABLE people (
                first_name VARCHAR,
                last_name VARCHAR
            )
        """
        )
        c.execute("INSERT INTO people VALUES ('John', 'Doe')")
        c.execute("INSERT INTO people VALUES ('Jane', 'Smith')")
        c.execute("INSERT INTO people VALUES ('Michael', 'Jordan')")
        c.execute("SELECT * FROM people")

    content = c.fetchall()
    assert len(content) == 3
    assert content[0][0] == "John"
    assert content[1][0] == "Jane"
    assert content[2][0] == "Michael"
