If no indexURL is provided, we throw and catch an error and
then use ErrorStackParser to calculate where pyodide.js has
been loaded from. Resolves #2290.
ENH Calculate indexURL from error stack trace. If no indexURL is provided, we throw and catch an error and
then use ErrorStackParser to calculate where pyodide.js has
been loaded from. Resolves #2290.
def test_pytest(selenium):
    # TODO: don't use numpy in this test as it's not necessairly installed.
    selenium.load_package(["pytest", "numpy", "nose"])

    selenium.run(
        """
        from pathlib import Path
        import os
        import numpy
        import pytest

        base_dir = Path(numpy.__file__).parent / "core" / "tests"
        """
    )

    selenium.run("pytest.main([str(base_dir / 'test_api.py')])")

    logs = "\n".join(selenium.logs)
    assert "INTERNALERROR" not in logs

def test_pytest(selenium):
    # TODO: don't use numpy in this test as it's not necessairly installed.
    selenium.load_package(["pytest", "numpy", "nose"])

    selenium.run(
        """
        from pathlib import Path
        import os
        import numpy
        import pytest

        base_dir = Path(numpy.__file__).parent / "core" / "tests"
        """
    )

    selenium.run("pytest.main([str(base_dir / 'test_api.py')])")

    logs = "\n".join(selenium.logs)
    assert "INTERNALERROR" not in logs
