Skip to content

Commit

Permalink
Add nox -s test
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg committed Aug 21, 2020
1 parent f281417 commit d8df29f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
13 changes: 13 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,16 @@
def lint(session):
session.install("pre-commit")
session.run("pre-commit", "run", "--all-files", *session.posargs)


@nox.session(python=["3.6", "3.7", "3.8"])
def test(session):
session.install(".[test]")
# fmt: off
default_args = [
"--cov-report", "term",
"--cov", "sphinx_autobuild",
"sphinx_autobuild",
]
# fmt: on
session.run("pytest", *(session.posargs or default_args))
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ requires = [

[tool.flit.scripts]
sphinx-autobuild = "sphinx_autobuild:main"

[tool.flit.metadata.requires-extra]
test = ["mock", "pytest", "pytest-cov"]
2 changes: 0 additions & 2 deletions pytest.ini

This file was deleted.

0 comments on commit d8df29f

Please sign in to comment.