From @12rambau/pypackage - 0.1.4 Copier project. + 0.1.11 Copier project.
diff --git a/noxfile.py b/noxfile.py index 6ed4410..c68bd9d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -19,10 +19,18 @@ def lint(session): @nox.session(reuse_venv=True) def test(session): - """Run all the test using the environment variable of the running machine.""" + """Run the selected tests and report coverage in html.""" session.install(".[test]") test_files = session.posargs or ["tests"] - session.run("pytest", "--color=yes", "--cov", "--cov-report=xml", *test_files) + session.run("pytest", "--color=yes", "--cov", "--cov-report=html", *test_files) + + +@nox.session(reuse_venv=True, name="ci-test") +def ci_test(session): + """Run all the test and report coverage in xml.""" + session.install(".[test]") + session.posargs[0] if session.posargs else "default" + session.run("pytest", "--color=yes", "--cov", "--cov-report=xml") @nox.session(reuse_venv=True, name="dead-fixtures") diff --git a/pyproject.toml b/pyproject.toml index 9fafee9..15fc83f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,10 +14,10 @@ classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ] requires-python = ">=3.8" dependencies = [ @@ -87,6 +87,9 @@ version_files = [ [tool.pytest.ini_options] testpaths = "tests" +[tool.black] +line-length = 105 # super small margin for items that are 2 characters too long + [tool.ruff] ignore-init-module-imports = true fix = true @@ -117,6 +120,3 @@ warn_redundant_casts = true [tool.licensecheck] using = "PEP631" - -[tool.black] -line-length = 105 # super small margin for items that are 2 characters too long