Skip to content

Commit faf2d9c

Browse files
committed
chore: register new pytest ssh key mock markers in pyproject.toml
In PR canonical#406, two pytest marks were added to help with mocking ssh keys in unit tests, but the marks were not registered with pytest so it was raising errors. This commit fixes that! Also, migrate existing pytest configuration from tox.ini to pyproject.toml
1 parent c05deab commit faf2d9c

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1!10.1.2
1+
1!10.2.0

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,12 @@ extend-select = [
5252

5353
[tool.ruff.lint.pydocstyle]
5454
convention = "pep257"
55+
56+
[tool.pytest.ini_options]
57+
markers = [
58+
"mock_ssh_keys: mock the base cloud _get_ssh_keys method to avoid checking for ssh keys",
59+
"dont_mock_ssh_keys: if a class or method is marked with this, it will override the mock_ssh_keys marker",
60+
"ci: run test as part of continuous integration on PRs using GitHub Actions",
61+
"main_check: run test as part of continuous integration after branch has merged to main using GitHub Actions",
62+
]
63+
testpaths = ["tests/unit_tests"]

tox.ini

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,3 @@ commands = {envpython} -m pytest -n 5 -m main_check --log-cli-level=DEBUG -svv {
9797
deps = {[testenv:integration-tests-ci]deps}
9898
passenv =
9999
GOOGLE_APPLICATION_CREDENTIALS
100-
101-
[pytest]
102-
testpaths = tests/unit_tests
103-
markers =
104-
ci: run test on as part of continuous integration
105-
main_check: run test after branch has merged to main

0 commit comments

Comments
 (0)