Skip to content

Commit 4d39111

Browse files
committed
Update cookiecutter
1 parent 7ddea3d commit 4d39111

6 files changed

Lines changed: 31 additions & 5 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
__pycache__/
33
build/
44
tests/cli.toml
5-
pytest_pulp_cli/GPG-PRIVATE-KEY-fixture-signing
5+
GPG-PRIVATE-KEY-fixture-signing
66
site/
77
dist/
88
*.po~

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ lint:
2626
ruff check --diff
2727
.ci/scripts/check_cli_dependencies.py
2828
.ci/scripts/check_click_for_mypy.py
29-
MYPYPATH=pulp-glue-maven mypy
29+
mypy
3030
cd pulp-glue-maven; mypy
3131
@echo "🙊 Code 🙈 LGTM 🙉 !"
3232

lint_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Lint requirements
2-
ruff~=0.15.0
2+
ruff~=0.15.1
33
mypy~=1.19.1
44
shellcheck-py~=0.11.0.1
55

pulp-glue-maven/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ strict = true
4747
warn_unused_ignores = false
4848
show_error_codes = true
4949
files = "pulp_glue/**/*.py, tests/**/*.py"
50+
mypy_path = ["."]
5051
namespace_packages = true
5152
explicit_package_bases = true
5253

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ namespaces = true
4949
# This section is co-managed by the cookiecutter templates.
5050
# Changes to existing keys should be preserved.
5151
app_label = "maven"
52+
src_layout = false
5253
repository = "https://github.com/pulp/pulp-cli-maven"
5354
glue = true
5455
docs = false
@@ -122,6 +123,7 @@ strict = true
122123
warn_unused_ignores = false
123124
show_error_codes = true
124125
files = "pulpcore/**/*.py, tests/*.py"
126+
mypy_path = [".", "pulp-glue-maven"]
125127
namespace_packages = true
126128
explicit_package_bases = true
127129

@@ -199,4 +201,3 @@ extend-select = ["I"]
199201
sections = { second-party = ["pulp_glue"] }
200202
section-order = ["future", "standard-library", "third-party", "second-party", "first-party", "local-folder"]
201203

202-

tests/scripts/config.source

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ expect_deny () {
6464
cat log.err >&3
6565
false
6666
else
67-
if grep -q "You do not have permission" log.err
67+
if grep -q "Operation .* not authorized." log.err
6868
then
6969
echo "SUCCESS [! $@]" >&3
7070
OUTPUT="$(cat log.out)"
@@ -80,4 +80,28 @@ expect_deny () {
8080
fi
8181
}
8282

83+
# Expects the provided test to pass
84+
# Supresses all output, which is redirected to ASSERTION_OUTPUT and
85+
# ASSERTION_ERROUTPUT so as not to overwrite the latest OUTPUT and ERROUTPUT.
86+
# That way we can test several assertions in a row.
87+
# Reports verbosely on failure.
88+
assert () {
89+
if {
90+
[[ "$@" ]]
91+
} 1>log.out 2>log.err
92+
then
93+
echo "SUCCESS [$@]" >&3
94+
ASSERTION_OUTPUT="$(cat log.out)"
95+
ASSERTION_ERROUTPUT="$(cat log.err)"
96+
else
97+
echo "FAILURE [$@]" >&3
98+
echo "=== STDOUT ===" >&3
99+
cat log.out >&3
100+
echo "=== STDERR ===" >&3
101+
cat log.err >&3
102+
echo "==============" >&3
103+
false
104+
fi
105+
}
106+
83107
set -eu

0 commit comments

Comments
 (0)