def test(session): session.install(".") session.install("-r", "requirements-test.txt") if session.posargs: session.run("pytest", *session.posargs) else: session.run("pytest")
def test(session: Session) -> None: packages = sorted( p.name if not p.name.endswith("-stubs") else p.name[: -len("-stubs")] for p in Path("src").iterdir() if not p.name.endswith(".mypy_cache") and not p.name.endswith(".egg-info") ) session.install("-e", ".[test]") session.run("mypy", ".") session.run("mypy", *(arg for package in packages for arg in ("-p", package)))
def coverage(session): session.install(".") session.install("-r", "requirements-test.txt") session.install("-r", "requirements-coverage.txt") session.run( "pytest", "--cov", "src/opentelemetry/lightstep", "--cov-report", "xml" )
def test(session: Session) -> None: session.install("-e", ".[test]") session.run( "pytest", "--cov", "--cov-report=", "--cov-context", "test", "--html", "tests-report.html", "--self-contained-html", )
def coverage(session): session.install(".") session.install("-r", "requirements-test.txt") session.install("-r", "requirements-coverage.txt") session.run( "pytest", "--cov", "src/opentelemetry/launcher", "--cov-report", "xml", "-k", "TestConfiguration", )
def lint(session): session.install(".") session.install("-r", "requirements-test.txt") session.install("-r", "requirements-lint.txt") session.run("black", "src") session.run("isort", "--recursive", "src") session.run("pylint", "src")