From 809c45dd4375a4b428d5614d0972c910ab00ddd4 Mon Sep 17 00:00:00 2001 From: Tomas Janousek Date: Tue, 26 Dec 2023 14:49:43 +0100 Subject: [PATCH] Render template ../cookiecutter-python-cli at 25d7a6eb7b --- .cookiecutter.json | 1 + .github/workflows/check.yaml | 6 +++--- Makefile | 12 ++++++------ pyproject.toml | 3 +-- tests/cram-noescape.py | 8 -------- tests/prysk-noescape.py | 10 ++++++++++ 6 files changed, 21 insertions(+), 19 deletions(-) delete mode 100755 tests/cram-noescape.py create mode 100755 tests/prysk-noescape.py diff --git a/.cookiecutter.json b/.cookiecutter.json index e8386c1..c94081a 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,6 @@ { "_dest_dir": "worktree", + "_setuptools_scm_root": "", "_template": "../cookiecutter-python-cli", "_template_name": "cookiecutter-python-cli", "author_email": "tomi@nomi.cz", diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 5b3a4cf..0a5a060 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -72,8 +72,8 @@ jobs: with: linters: pytest run: make test-pytest - - name: cram, readme - run: make test-cram readme + - name: prysk, readme + run: make test-prysk readme - name: check-wheel run: make check-wheel @@ -140,7 +140,7 @@ jobs: with: linters: pytest run: make test-pytest - - name: cram, readme + - name: prysk, readme run: make readme - name: check-wheel run: make check-wheel diff --git a/Makefile b/Makefile index 4014971..089d7f7 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ lint-isort: $(VENV_DONE) $(VENV_PYTHON) -m isort --check $(LINT_SOURCES) .PHONY: test -test: test-pytest test-cram +test: test-pytest test-prysk .PHONY: test-pytest test-pytest: $(VENV_DONE) @@ -61,17 +61,17 @@ test-pytest: $(VENV_DONE) readme: README.md git diff --exit-code $^ -.PHONY: test-cram -test-cram: CRAM_INTERACTIVE=$(shell [ -t 0 ] && echo --interactive) -test-cram: $(VENV_DONE) +.PHONY: test-prysk +test-prysk: PRYSK_INTERACTIVE=$(shell [ -t 0 ] && echo --interactive) +test-prysk: $(VENV_DONE) PATH="$(CURDIR)/$(VENV)/bin:$$PATH" \ XDG_DATA_HOME=/home/user/.local/share \ XDG_CONFIG_HOME=/home/user/.config \ - $(VENV_PYTHON) tests/cram-noescape.py --indent=4 --shell=/bin/bash $(CRAM_INTERACTIVE) \ + $(VENV_PYTHON) tests/prysk-noescape.py --indent=4 --shell=/bin/bash $(PRYSK_INTERACTIVE) \ $(wildcard tests/*.md tests/*/*.md tests/*/*/*.md) .PHONY: README.md -README.md: test-cram +README.md: test-prysk tests/include.py < $@ > $@.tmp mv -f $@.tmp $@ diff --git a/pyproject.toml b/pyproject.toml index c25010a..e0a5be9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,10 +36,10 @@ dependencies = [ [project.optional-dependencies] dev = [ "build >= 0.7", - "cram", "flake8", "isort >= 5.0", "mypy >= 0.900", + "prysk == 0.16.0", "twine", "types-PyYAML", ] @@ -63,7 +63,6 @@ dependencies-apt = [ "python3-build", "python3-click", "python3-configobj", - "python3-cram", "python3-flake8", "python3-importlib-metadata", "python3-isort", diff --git a/tests/cram-noescape.py b/tests/cram-noescape.py deleted file mode 100755 index 31a41de..0000000 --- a/tests/cram-noescape.py +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python3 - -import runpy - -import cram # type: ignore [import] - -cram._test._needescape = lambda _: False -runpy.run_module('cram') diff --git a/tests/prysk-noescape.py b/tests/prysk-noescape.py new file mode 100755 index 0000000..6dd0206 --- /dev/null +++ b/tests/prysk-noescape.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 + +from pathlib import Path +import runpy + +import prysk.test # type: ignore [import] + +prysk.test._IS_ESCAPING_NEEDED = lambda _: False +prysk.test._findtests = lambda paths: map(Path, paths) # https://github.com/prysk/prysk/issues/224 +runpy.run_module('prysk')