Skip to content

Commit

Permalink
Merge branch 'template'
Browse files Browse the repository at this point in the history
  • Loading branch information
liskin committed Dec 26, 2023
2 parents b48128b + f65654d commit 80746c1
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 19 deletions.
1 change: 1 addition & 0 deletions .cookiecutter.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"_dest_dir": "worktree",
"_setuptools_scm_root": "",
"_template": "../cookiecutter-python-cli",
"_template_name": "cookiecutter-python-cli",
"author_email": "[email protected]",
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 $@

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ dependencies = [
[project.optional-dependencies]
dev = [
"build >= 0.7",
"cram",
"flake8",
"isort >= 5.0",
"mypy >= 0.900",
"prysk == 0.16.0",
"twine",
"types-PyYAML",
"types-requests",
Expand Down Expand Up @@ -76,7 +76,6 @@ dependencies-apt = [
"python3-click",
"python3-click-option-group",
"python3-configobj",
"python3-cram",
"python3-flake8",
"python3-importlib-metadata",
"python3-isort",
Expand Down
8 changes: 0 additions & 8 deletions tests/cram-noescape.py

This file was deleted.

10 changes: 10 additions & 0 deletions tests/prysk-noescape.py
Original file line number Diff line number Diff line change
@@ -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')

0 comments on commit 80746c1

Please sign in to comment.