Skip to content

Commit f6fecee

Browse files
committed
fix more tests
1 parent c9c4b27 commit f6fecee

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

packages/help/noxfile.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import nox
1919

2020
DEFAULT_PYTHON_VERSION = "3.14"
21-
ALL_PYTHON = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
21+
ALL_PYTHON = ["3.10", "3.11", "3.12", "3.13", "3.14"]
2222
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
2323
REPO_ROOT = CURRENT_DIRECTORY.parent.parent
2424

@@ -30,7 +30,9 @@
3030

3131
nox.options.sessions = [
3232
"lint",
33+
"lint_setup_py",
3334
"unit",
35+
"mypy",
3436
"prerelease_deps",
3537
"core_deps_from_source",
3638
"docfx",
@@ -39,13 +41,26 @@
3941
# Error if a python version is missing
4042
nox.options.error_on_missing_interpreters = True
4143

44+
@nox.session(python=DEFAULT_PYTHON_VERSION)
45+
def lint_setup_py(session):
46+
"""Verify that setup.py is valid."""
47+
session.install("setuptools")
48+
session.run("python", "setup.py", "check", "--strict")
49+
4250
@nox.session(python=ALL_PYTHON)
4351
def unit(session):
4452
"""Run unit tests."""
4553
session.install("pytest", "pytest-cov")
4654
session.install("-e", ".")
4755
session.run("pytest", "tests")
4856

57+
@nox.session(python=DEFAULT_PYTHON_VERSION)
58+
def mypy(session):
59+
"""Run mypy."""
60+
session.install("mypy", "types-PyYAML")
61+
session.install("-e", ".")
62+
session.run("mypy", "help", "tests", "noxfile.py", "docfx_helper.py")
63+
4964
@nox.session(python=DEFAULT_PYTHON_VERSION)
5065
def prerelease_deps(session):
5166
"""Run unit tests with prerelease dependencies."""

0 commit comments

Comments
 (0)