pyodide/test/test_testing.py

27 lines
629 B
Python
Raw Normal View History

import pathlib
2018-08-23 14:48:57 +00:00
def test_pytest(selenium):
2018-09-07 12:01:58 +00:00
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([base_dir / 'test_api.py'])")
2018-08-23 14:48:57 +00:00
logs = '\n'.join(selenium.logs)
assert 'INTERNALERROR' not in logs
def test_web_server_secondary(selenium, web_server_secondary):
host, port, logs = web_server_secondary
assert pathlib.Path(logs).exists()
assert selenium.server_port != port