def tests(session: Session) -> None: """Run the test suite.""" session.install(".") session.install("coverage[toml]", "pytest", "pygments") try: session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs) finally: if session.interactive: session.notify("coverage", posargs=[])
def tests(session): """Run the test suite.""" session.install(".[data]") session.install("coverage[toml]", "pytest", "nox", "nox-poetry") try: session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs) finally: if session.interactive: session.notify("coverage")
def tests(session: Session) -> None: """Run the test suite.""" # by default, run only the tests that are in the `tests` directory args = session.posargs or ["tests"] session.install(".") session.install("coverage[toml]", "pytest", "pygments") try: session.run("coverage", "run", "--parallel", "-m", "pytest", *args) finally: if session.interactive: session.notify("coverage")
def tests(session: Session) -> None: """Run the test suite.""" session.install(".") session.install("coverage[toml]", "pytest", "pytest-mock", "pygments", "ruamel.yaml") try: session.run("coverage", "run", "--parallel", "-m", "pytest", "--ignore-glob=**/templates/*", *session.posargs) finally: if session.interactive: session.notify("coverage")
def tests(session: Session, sqlalchemy: str) -> None: """Run the test suite.""" session.install(".") # TODO: Revisit how to parameterize sessions for different sqlalchemy versions session.run("pip", "install", f"sqlalchemy~={sqlalchemy}") session.install("coverage[toml]", "pytest", "pygments") try: session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs) finally: if session.interactive: session.notify("coverage")
def tests(session: Session) -> None: """Run the test suite.""" session.install(".") session.install( "coverage[toml]", "pytest", "pygments", "hypothesis", "pytest-datafiles", "onnxruntime", ) try: session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs) finally: if session.interactive: session.notify("coverage")
def tests(session: Session) -> None: """Run the test suite.""" session.install(".") session.install( "coverage[toml]", "poetry", "pytest", "pytest-datadir", "pygments", ) if session.python == "3.6": session.install("dataclasses") try: session.env.pop("TMPDIR", None) session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs) finally: if session.interactive: session.notify("coverage")
def tests(session: Session) -> None: """Run the test suite.""" session.install(".") session.install( "coverage[toml]", "pytest", "pygments", "pytest-random-order", "pytest-console-scripts", ) try: session.run( "coverage", "run", "--parallel", "-m", "pytest", "--random-order", "--script-launch-mode=subprocess", *session.posargs, ) finally: if session.interactive: session.notify("coverage")
def tests(session: Session) -> None: """Run the test suite.""" session.install(".") session.install( "coverage[toml]", "coverage-conditional-plugin", "pygments", "pytest", "pytest-benchmark", "pytest-mock", ) env = { "COVERAGE_FILE": os.environ.get( "COVERAGE_FILE", ".coverage.{}.py{}".format(session.name, session.python) ), } try: session.run("coverage", "run", "-m", "pytest", *session.posargs, env=env) session.run("coverage", "report", env=env) finally: if session.interactive: session.notify("coverage")