|
1 | 1 | """Nox sessions."""
|
2 | 2 | # import shlex
|
3 | 3 | # import shutil
|
4 |
| -import sys |
5 |
| -from pathlib import Path |
| 4 | +# import sys |
| 5 | +# from pathlib import Path |
6 | 6 |
|
7 |
| -# from textwrap import dedent |
| 7 | +# # from textwrap import dedent |
8 | 8 | import nox
|
9 |
| -from nox import Session, session |
| 9 | + |
| 10 | +# from nox import Session, session |
10 | 11 |
|
11 | 12 | """
|
12 | 13 | Helps for future developer to implement tests using Nox
|
|
57 | 58 | # activate_virtualenv_in_precommit_hooks(session)
|
58 | 59 |
|
59 | 60 |
|
60 |
| -@session(python=python_versions) |
61 |
| -def mypy(session: Session) -> None: |
62 |
| - """Type-check using mypy.""" |
63 |
| - args = session.posargs or ["src", "tests", "docs/conf.py"] |
64 |
| - session.install(".[lint]") |
65 |
| - session.install("mypy", "pytest") |
66 |
| - session.run("mypy", *args) |
67 |
| - if not session.posargs: |
68 |
| - session.run("mypy", f"--python-executable={sys.executable}", "noxfile.py") |
| 61 | +# @session(python=python_versions) |
| 62 | +# def mypy(session: Session) -> None: |
| 63 | +# """Type-check using mypy.""" |
| 64 | +# args = session.posargs or ["src", "tests", "docs/conf.py"] |
| 65 | +# session.install(".[lint]") |
| 66 | +# session.install("mypy", "pytest") |
| 67 | +# session.run("mypy", *args) |
| 68 | +# if not session.posargs: |
| 69 | +# session.run("mypy", f"--python-executable={sys.executable}", "noxfile.py") |
69 | 70 |
|
70 | 71 |
|
71 |
| -@session(python=python_versions) |
72 |
| -def tests(session: Session) -> None: |
73 |
| - """Run the test suite.""" |
74 |
| - session.install(".[test]") |
75 |
| - session.install("coverage[toml]", "pytest", "pygments") |
76 |
| - try: |
77 |
| - session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs) |
78 |
| - finally: |
79 |
| - if session.interactive: |
80 |
| - session.notify("coverage", posargs=[]) |
| 72 | +# @session(python=python_versions) |
| 73 | +# def tests(session: Session) -> None: |
| 74 | +# """Run the test suite.""" |
| 75 | +# session.install(".[test]") |
| 76 | +# session.install("coverage[toml]", "pytest", "pygments") |
| 77 | +# try: |
| 78 | +# session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs) |
| 79 | +# finally: |
| 80 | +# if session.interactive: |
| 81 | +# session.notify("coverage", posargs=[]) |
81 | 82 |
|
82 | 83 |
|
83 |
| -@session(python=python_versions[0]) |
84 |
| -def coverage(session: Session) -> None: |
85 |
| - """Produce the coverage report.""" |
86 |
| - args = session.posargs or ["report"] |
| 84 | +# @session(python=python_versions[0]) |
| 85 | +# def coverage(session: Session) -> None: |
| 86 | +# """Produce the coverage report.""" |
| 87 | +# args = session.posargs or ["report"] |
87 | 88 |
|
88 |
| - session.install("coverage[toml]") |
| 89 | +# session.install("coverage[toml]") |
89 | 90 |
|
90 |
| - if not session.posargs and any(Path().glob(".coverage.*")): |
91 |
| - session.run("coverage", "combine") |
| 91 | +# if not session.posargs and any(Path().glob(".coverage.*")): |
| 92 | +# session.run("coverage", "combine") |
92 | 93 |
|
93 |
| - session.run("coverage", *args) |
| 94 | +# session.run("coverage", *args) |
94 | 95 |
|
95 | 96 |
|
96 |
| -@session(python=python_versions[0]) |
97 |
| -def typeguard(session: Session) -> None: |
98 |
| - """Runtime type checking using Typeguard.""" |
99 |
| - session.install(".[dev]") |
100 |
| - session.install("pytest", "typeguard", "pygments") |
101 |
| - session.run("pytest", f"--typeguard-packages={package}", *session.posargs) |
| 97 | +# @session(python=python_versions[0]) |
| 98 | +# def typeguard(session: Session) -> None: |
| 99 | +# """Runtime type checking using Typeguard.""" |
| 100 | +# session.install(".[dev]") |
| 101 | +# session.install("pytest", "typeguard", "pygments") |
| 102 | +# session.run("pytest", f"--typeguard-packages={package}", *session.posargs) |
102 | 103 |
|
103 | 104 |
|
104 | 105 | # @session(name="docs-build", python=python_versions[0])
|
|
0 commit comments