(session: nox.Session)
Run tests.
Run tests.
Run tests .
def tests(session: nox.Session) -> None:
    """
    Run tests.
    """
    posargs = session.posargs
    extras = "coverage" if RUNNING_CI else "test"
    session.install("-e", f".[{extras}]")
    if RUNNING_CI:
        session.install("codecov")
        posargs.extend(["--cov", "auditwheel", "--cov-branch"])
        # pull manylinux images that will be used.
        # this helps passing tests which would otherwise timeout.
        for image in _docker_images(session):
            session.run("docker", "pull", image, external=True)

    session.run("pytest", "-s", *posargs)
    if RUNNING_CI:
        session.run("auditwheel", "lddtree", sys.executable)
        try:
            session.run("codecov")
        except nox.command.CommandFailed:
            pass
def tests ( session : nox . Session ) -> None : posargs = session . posargs extras = "coverage" if RUNNING_CI else "test" session . install ( "-e" , f".[{extras}]" ) if RUNNING_CI : session . install ( "codecov" ) posargs . extend ( [ "--cov" , "auditwheel" , "--cov-branch" ] ) # pull manylinux images that will be used. # this helps passing tests which would otherwise timeout. for image in _docker_images ( session ) : session . run ( "docker" , "pull" , image , external = True ) session . run ( "pytest" , "-s" , * posargs ) if RUNNING_CI : session . run ( "auditwheel" , "lddtree" , sys . executable ) try : session . run ( "codecov" ) except nox . command . CommandFailed : pass