Skip to content

Commit 2b34c1e

Browse files
authored
Merge branch 'main' into dependabot/github_actions/actions/checkout-5
2 parents 2b49e01 + 2b31c9c commit 2b34c1e

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

CHANGES.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Changelog
22

3-
## 1.2.3 (unreleased)
3+
## 1.3.0 (unreleased)
44

5-
- No changes yet.
5+
- Introduce testargs for pytest to have more control over the test and pass it args.
66

77
## 1.2.2 (2025-06-30)
88

@@ -14,10 +14,8 @@
1414

1515
- Fix test-script to not end with backslash if there is no `testpaths` (which is valid).
1616
Improve tests to cover more edge cases, i.e. above and multi-line.
17-
18-
- Fix Python check for global UV and use PRIMARY_PYTHON for UV as version definition.
19-
2017
- Improve test to read large amount of output from file (Makefile template check).
18+
- Fix Python check for global UV and use PRIMARY_PYTHON for UV as version definition.
2119

2220
## 1.2.0 (2025-06-04)
2321

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "mxmake"
33
description = "Generates a Python project-specific Makefile by using an extensible library of configurable Makefile snippets."
4-
version = "1.2.3.dev0"
4+
version = "1.3.0.dev0"
55
keywords = ["development", "deployment", "make"]
66
authors = [
77
{name = "MX Stack Developers", email = "dev@bluedynamics.com" }

src/mxmake/templates.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ def template_variables(self) -> typing.Dict[str, typing.Any]:
160160
description=self.description,
161161
env=self.env,
162162
testpaths=self.package_paths(ns_name("test-path")),
163+
testargs=self.config.settings.get("mxmake-test-runner-args", ""),
163164
)
164165

165166
def package_paths(self, attr: str) -> typing.List[str]:

src/mxmake/templates/pytest-run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends "env.sh" %}
22

33
{% block env_content %}
4-
pytest{% if testpaths %} \{% endif +%}
4+
pytest {{ testargs }} {% if testpaths %} \{% endif +%}
55
{% for path in testpaths %}
66
{{ path }}{% if not loop.last %} \{% endif +%}
77
{% endfor %}

src/mxmake/tests/test_templates.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ def test_TestScript(self, tempdir):
155155
"description": "Run tests",
156156
"env": {"ENV_PARAM": "env_value"},
157157
"testpaths": ["sources/package/src", "src", "tests"],
158+
"testargs": "",
158159
},
159160
)
160161
self.assertEqual(template.package_paths("inexistent"), [])
@@ -328,6 +329,7 @@ def test_CoverageScript(self, tempdir):
328329
"description": "Run coverage",
329330
"env": {"ENV_PARAM": "env_value"},
330331
"testpaths": ["sources/package/src", "src"],
332+
"testargs": "",
331333
"sourcepaths": ["sources/package/src/package", "src/local"],
332334
"omitpaths": [
333335
"sources/package/src/package/file1.py",

0 commit comments

Comments
 (0)