@@ -89,8 +89,11 @@ def parametrize_test_versions():
8989 if sqlalchemy_version >= Version ("1.2" ) or python_minor <= 9 ]
9090
9191
92+ PARAMETRIZED_TEST_VERSIONS = parametrize_test_versions ()
93+
94+
9295@nox .session ()
93- @nox .parametrize ("python,sqlalchemy" , parametrize_test_versions () )
96+ @nox .parametrize ("python,sqlalchemy" , PARAMETRIZED_TEST_VERSIONS )
9497def test (session , sqlalchemy ):
9598 """Run tests with pytest.
9699
@@ -111,6 +114,15 @@ def test(session, sqlalchemy):
111114 session .install ("-e" , "." )
112115 pytest_args = session .posargs or ["--pyargs" , "sqlalchemy_mptt" ]
113116 session .run ("pytest" , * pytest_args , env = {"SQLALCHEMY_WARN_20" : "1" })
117+
118+
119+ @nox .session ()
120+ @nox .parametrize ("python,sqlalchemy" , PARAMETRIZED_TEST_VERSIONS [- 1 :])
121+ def doctest (session , sqlalchemy ):
122+ """Run doctests in the documentation."""
123+ session .install ("sphinx" )
124+ session .install (f"sqlalchemy~={ sqlalchemy } .0" )
125+ session .install ("-e" , "." )
114126 session .run ("sphinx-build" , "-b" , "doctest" , "docs" , "docs/_build" )
115127
116128
0 commit comments