#  tests for anyio-2.0.2-py39h6ffa863_2 (this is a generated file);
print('===== testing package: anyio-2.0.2-py39h6ffa863_2 =====');
print('running run_test.py');
#  --- run_test.py (begin) ---
import os
import sys

import pytest

print("preflighting uvloop...", flush=True)
try:
    import uvloop
    print("... uvloop _appears_ to be working!")
except Exception as err:
    print(f"... uvloop import error, ignoring:\n{err}")

COV_THRESHOLD = {
    "win32": "68",
    "linux": "71",
    "darwin": "71"
}.get(sys.platform)

SKIPS = [
    "connection_refused",
    "happy_eyeballs",
    "ipv6",
]

PYTEST_ARGS = [
    "-vv",
    "--cov", os.environ["PKG_NAME"],
    "--cov-fail-under", COV_THRESHOLD,
    "-k", f"""not ({" or ".join(SKIPS)})""",
    "src"
]

print(">>> pytest", " ".join(PYTEST_ARGS), flush=True)

sys.exit(pytest.main(PYTEST_ARGS))
#  --- run_test.py (end) ---

print('===== anyio-2.0.2-py39h6ffa863_2 OK =====');
print("import: 'anyio'")
import anyio

